test-tool json-writer: fix memory leaks
commit1caaa858ccec11adaa3f9a649c15b766da474078
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 1 Jul 2022 10:37:37 +0000 (1 12:37 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 Jul 2022 20:38:50 +0000 (1 13:38 -0700)
treec58e47ec334096e29e005641f42502bd15cac1a4
parenta20b0dc796c1fd8998ba81c985261a376c866c9b
test-tool json-writer: fix memory leaks

Fix memory leaks introduced with these tests in
75459410edd (json_writer: new routines to create JSON data,
2018-07-13), as a result we can mark a test as passing with
SANITIZE=leak using "TEST_PASSES_SANITIZE_LEAK=true".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-json-writer.c
t/t0019-json-writer.sh