projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
60f62f8
)
Merge pull request #460 from jplitza/master
author
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 1 Sep 2015 07:34:14 +0000
(09:34 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 1 Sep 2015 07:34:14 +0000
(09:34 +0200)
luci-lib-jsonc: Fix memory leak in stringify()
libs/luci-lib-jsonc/src/jsonc.c
patch
|
blob
|
history
diff --git
a/libs/luci-lib-jsonc/src/jsonc.c
b/libs/luci-lib-jsonc/src/jsonc.c
index 971fb122f7655b379e717ef78a5417032ead9a57..b857c979e93bec395bca164a4f144c7c69005bec 100644
(file)
--- a/
libs/luci-lib-jsonc/src/jsonc.c
+++ b/
libs/luci-lib-jsonc/src/jsonc.c
@@
-106,6
+106,7
@@
static int json_stringify(lua_State *L)
flags |= JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_SPACED;
lua_pushstring(L, json_object_to_json_string_ext(obj, flags));
+ json_object_put(obj);
return 1;
}