diff options
author | Jan-Philipp Litza <janphilipp@litza.de> | 2015-08-31 19:52:36 +0200 |
---|---|---|
committer | Jan-Philipp Litza <janphilipp@litza.de> | 2015-08-31 19:53:51 +0200 |
commit | 90c841d66e5a13735996e5177b622cb0deae9016 (patch) | |
tree | f2a3bb6c7c36b63bf2b172d87880f043d4a7c795 /libs | |
parent | c0e2255ae90145062d5966725c7ee5da3c310ce1 (diff) |
luci-lib-jsonc: Fix memory leak in stringify()
Diffstat (limited to 'libs')
-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 971fb122f..b857c979e 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; } |