From: Pauli Date: Sun, 13 Sep 2020 21:44:45 +0000 (+1000) Subject: PKCS5 PBE: free allocations on unlikely / impossible failure path X-Git-Tag: openssl-3.0.0-alpha7~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30f3b4e1c15cda063ed3e5ffc893b202afd671a3;p=thirdparty%2Fopenssl.git PKCS5 PBE: free allocations on unlikely / impossible failure path Reviewed-by: Richard Levitte Reviewed-by: Kurt Roeckx (Merged from https://github.com/openssl/openssl/pull/12870) --- diff --git a/crypto/evp/p5_crpt.c b/crypto/evp/p5_crpt.c index 4e9603757b2..7e9a80e5c0e 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;