Free memory on error path during the test
Related: rhbz#2129150
This commit is contained in:
parent
5fda6cb2b0
commit
e851661d50
@ -591,3 +591,31 @@ index 0ccde326..bfca4c23 100644
|
|||||||
--
|
--
|
||||||
2.34.1
|
2.34.1
|
||||||
|
|
||||||
|
From 567bc62e1c3046594088de7209fee7c545ece1e3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Jelen <jjelen@redhat.com>
|
||||||
|
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 <jjelen@redhat.com>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user