summaryrefslogtreecommitdiffstats
path: root/crypto/evp/p5_crpt.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-09-14 07:44:45 +1000
committerPauli <paul.dale@oracle.com>2020-09-16 07:22:43 +1000
commit30f3b4e1c15cda063ed3e5ffc893b202afd671a3 (patch)
tree92f0a528076c90ca3bffeca2128dc5206055fe82 /crypto/evp/p5_crpt.c
parente2d66c0d007ad8bcf80890dadf681135d24d86cd (diff)
PKCS5 PBE: free allocations on unlikely / impossible failure path
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/12870)
Diffstat (limited to 'crypto/evp/p5_crpt.c')
-rw-r--r--crypto/evp/p5_crpt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/p5_crpt.c b/crypto/evp/p5_crpt.c
index 4e9603757b..7e9a80e5c0 100644
--- a/crypto/evp/p5_crpt.c
+++ b/crypto/evp/p5_crpt.c
@@ -91,7 +91,7 @@ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen,
goto err;
mdsize = EVP_MD_size(md);
if (mdsize < 0)
- return 0;
+ goto err;
for (i = 1; i < iter; i++) {
if (!EVP_DigestInit_ex(ctx, md, NULL))
goto err;