From: Kurt Roeckx Date: Thu, 17 Dec 2020 21:28:17 +0000 (+0100) Subject: Fix memory leak in mac_newctx() on error X-Git-Tag: openssl-3.0.0-alpha11~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47b784a41b729d5df9ad47c99355db2f2026a709;p=thirdparty%2Fopenssl.git Fix memory leak in mac_newctx() on error Reviewed-by: Richard Levitte Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/13702) --- diff --git a/providers/implementations/signature/mac_legacy.c b/providers/implementations/signature/mac_legacy.c index b92dabde3cc..79a5c911a39 100644 --- a/providers/implementations/signature/mac_legacy.c +++ b/providers/implementations/signature/mac_legacy.c @@ -74,6 +74,7 @@ static void *mac_newctx(void *provctx, const char *propq, const char *macname) return pmacctx; err: + OPENSSL_free(pmacctx->propq); OPENSSL_free(pmacctx); EVP_MAC_free(mac); return NULL;