projects
/
profile
/
ivi
/
jansson.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
978a47e
)
Fix a few memory leaks in tests
author
Petri Lehtinen
<petri@digip.org>
Thu, 10 Jun 2010 18:15:43 +0000
(21:15 +0300)
committer
Petri Lehtinen
<petri@digip.org>
Thu, 10 Jun 2010 18:16:07 +0000
(21:16 +0300)
No changes to the actual library code.
test/suites/api/test_dump.c
patch
|
blob
|
history
diff --git
a/test/suites/api/test_dump.c
b/test/suites/api/test_dump.c
index
97eb03e
..
f72f115
100644
(file)
--- 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);