commit a1913f83b643e883aa6754d8078aee7d46f53aec
Author:     Laslo Hunhold <[email protected]>
AuthorDate: Sat Oct 8 13:17:16 2022 +0200
Commit:     Laslo Hunhold <[email protected]>
CommitDate: Sat Oct 8 13:17:30 2022 +0200

    Avoid memory leak in break_test_list_free()
    
    Signed-off-by: Laslo Hunhold <[email protected]>

diff --git a/gen/util.c b/gen/util.c
index 8f37bfd..11cd561 100644
--- a/gen/util.c
+++ b/gen/util.c
@@ -692,7 +692,13 @@ break_test_list_print(const struct break_test *test, 
size_t testlen,
 void
 break_test_list_free(struct break_test *test, size_t testlen)
 {
-       (void)testlen;
+       size_t i;
+
+       for (i = 0; i < testlen; i++) {
+               free(test[i].cp);
+               free(test[i].len);
+               free(test[i].descr);
+       }
 
        free(test);
 }

Reply via email to