From 47b784a41b729d5df9ad47c99355db2f2026a709 Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Thu, 17 Dec 2020 22:28:17 +0100 Subject: [PATCH] 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) --- providers/implementations/signature/mac_legacy.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.47.2