diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-09-01 09:34:14 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-09-01 09:34:14 +0200 |
commit | fdb7daa90748bc28dbd57cb0b0d23efba6d8e1c9 (patch) | |
tree | f2a3bb6c7c36b63bf2b172d87880f043d4a7c795 | |
parent | 60f62f841f6816b83dab9a9028c4d0799992c56c (diff) | |
parent | 90c841d66e5a13735996e5177b622cb0deae9016 (diff) |
Merge pull request #460 from jplitza/master
luci-lib-jsonc: Fix memory leak in stringify()
-rw-r--r-- | libs/luci-lib-jsonc/src/jsonc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/luci-lib-jsonc/src/jsonc.c b/libs/luci-lib-jsonc/src/jsonc.c index 971fb122f7..b857c979e9 100644 --- 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; } |