From 46e9ee447f37c8dfbbb3b40ce6597e0928438fab Mon Sep 17 00:00:00 2001 From: olszomal Date: Wed, 29 Mar 2023 08:35:31 +0200 Subject: [PATCH] Fix pagehash resource leak, CID 1536895 --- pe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pe.c b/pe.c index 8c9391a..27c50fa 100644 --- a/pe.c +++ b/pe.c @@ -345,8 +345,10 @@ static int pe_verify_indirect_data(FILE_FORMAT_CTX *ctx, SpcAttributeTypeAndOpti } if (!pe_verify_page_hash(ctx, ph, phlen, phtype)) { printf("Page hash verification: failed\n\n"); + OPENSSL_free(ph); return 0; /* FAILED */ } + OPENSSL_free(ph); return 1; /* OK */ }