From: Eric Haszlakiewicz Date: Mon, 22 Jun 2020 01:12:03 +0000 (+0000) Subject: Fix memory leak in test_parse's single_incremental_parse(). X-Git-Tag: json-c-0.15-20200726~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7a72805e344509170c1665522c4f82a96d050ea7;p=thirdparty%2Fjson-c.git Fix memory leak in test_parse's single_incremental_parse(). --- diff --git a/tests/test_parse.c b/tests/test_parse.c index da82b516..c2a271cc 100644 --- a/tests/test_parse.c +++ b/tests/test_parse.c @@ -72,6 +72,10 @@ static void single_incremental_parse(const char *test_string, int clear_serializ chunksize, all_at_once_str, new_str); } json_tokener_free(tok); + if (all_at_once_obj) + json_object_put(all_at_once_obj); + if (new_obj) + json_object_put(new_obj); } static void single_basic_parse(const char *test_string, int clear_serializer)