From e126c92439fd54005b043e89ca022a3a9e2bfd97 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 14 Dec 2021 20:19:16 -0600 Subject: [PATCH] Security: Fix memory leak. Objects are allocated and only deallocated on error. On success, they are not deallocated and leaks memory when out of scope of the block. --- level_3/fake/c/private-make.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/private-make.c index 19774b3..d75f953 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/private-make.c @@ -245,9 +245,10 @@ extern "C" { } } + macro_f_fss_delimits_t_delete_simple(delimits); + macro_f_fss_comments_t_delete_simple(comments); + if (F_status_is_error(*status)) { - macro_f_fss_delimits_t_delete_simple(delimits); - macro_f_fss_comments_t_delete_simple(comments); macro_f_fss_objects_t_delete_simple(list_objects); macro_f_fss_contents_t_delete_simple(list_contents); -- 1.8.3.1