From: Kevin Day Date: Wed, 15 Dec 2021 02:19:16 +0000 (-0600) Subject: Security: Fix memory leak. X-Git-Tag: 0.5.7~35 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=e126c92439fd54005b043e89ca022a3a9e2bfd97;p=fll 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. --- 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);