aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2010-06-10 21:15:43 +0300
committerPetri Lehtinen <petri@digip.org>2010-06-10 21:16:07 +0300
commit1a090bbcd3ce95260ee5a69f0e21bc50f655b606 (patch)
tree23ed732e81107f69ab763b2e69e0005ed565eb18
parent978a47e2c52cca0999bbc8eb6d35674d4931ed5c (diff)
downloadjansson-1.2.zip
jansson-1.2.tar.gz
jansson-1.2.tar.bz2
Fix a few memory leaks in tests1.2
No changes to the actual library code.
-rw-r--r--test/suites/api/test_dump.c2
1 files changed, 2 insertions, 0 deletions
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);