diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-10-07 12:01:32 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-07 15:40:15 -0700 |
commit | c0b80e05f79a3a81af202203237687b1f4b25605 (patch) | |
tree | 807f79fdea6bd21a996b7e85f5f48750e400a1d3 /t/t9150-svk-mergetickets.sh | |
parent | tests: fix a memory leak in test-prio-queue.c (diff) | |
download | tgif-c0b80e05f79a3a81af202203237687b1f4b25605.tar.xz |
tests: fix a memory leak in test-parse-options.c
Fix a memory leak in t/helper/test-parse-options.c, we were not
freeing the allocated "struct string_list" or its items. Let's move
the declaration of the "list" variable into the cmd__parse_options()
and release it at the end.
In c8ba1639165 (parse-options: add OPT_STRING_LIST helper, 2011-06-09)
the "list" variable was added, and later on in
c8ba1639165 (parse-options: add OPT_STRING_LIST helper, 2011-06-09)
the "expect" was added.
The "list" variable was last touched in 2721ce21e43 (use string_list
initializer consistently, 2016-06-13), but it was still left at the
static scope, it's better to move it to the function for consistency.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9150-svk-mergetickets.sh')
0 files changed, 0 insertions, 0 deletions