From: Petri Lehtinen Date: Thu, 10 Jun 2010 18:15:43 +0000 (+0300) Subject: Fix a few memory leaks in tests X-Git-Tag: 1.0_branch~157^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a090bbcd3ce95260ee5a69f0e21bc50f655b606;p=profile%2Fivi%2Fjansson.git Fix a few memory leaks in tests No changes to the actual library code. --- diff --git a/test/suites/api/test_dump.c b/test/suites/api/test_dump.c index 97eb03e..f72f115 100644 --- a/test/suites/api/test_dump.c +++ b/test/suites/api/test_dump.c @@ -20,11 +20,13 @@ int main() result = json_dumps(json, 0); if(!result || strcmp(result, "{}")) fail("json_dumps failed"); + free(result); json_object_set_new(json, "foo", json_integer(5)); result = json_dumps(json, 0); if(!result || strcmp(result, "{\"foo\": 5}")) fail("json_dumps failed"); + free(result); json_decref(json);