From e851661d5052766718127c62bc2baea2d2cd9591 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 4 Oct 2022 13:01:58 +0200 Subject: [PATCH] Free memory on error path during the test Related: rhbz#2129150 --- libgcrypt-1.10.0-sha3-large.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/libgcrypt-1.10.0-sha3-large.patch b/libgcrypt-1.10.0-sha3-large.patch index faf3c6c..d03407e 100644 --- a/libgcrypt-1.10.0-sha3-large.patch +++ b/libgcrypt-1.10.0-sha3-large.patch @@ -591,3 +591,31 @@ index 0ccde326..bfca4c23 100644 -- 2.34.1 +From 567bc62e1c3046594088de7209fee7c545ece1e3 Mon Sep 17 00:00:00 2001 +From: Jakub Jelen +Date: Fri, 30 Sep 2022 14:54:14 +0200 +Subject: [PATCH] tests: Avoid memory leak + +* tests/hashtest.c (run_longtest): Avoid memory leak on error +-- + +Signed-off-by: Jakub Jelen +--- + tests/hashtest.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/hashtest.c b/tests/hashtest.c +index 9389e50c..379f7c40 100644 +--- a/tests/hashtest.c ++++ b/tests/hashtest.c +@@ -452,6 +452,7 @@ run_longtest (int algo, int gigs) + { + fail ("gcry_md_open failed for %s (%d): %s", + gcry_md_algo_name (algo), algo, gpg_strerror (err)); ++ free(hugepattern); + return; + } + +-- +2.37.3 +