Merge pull request #460 from jplitza/master
luci-lib-jsonc: Fix memory leak in stringify()
This commit is contained in:
commit
fdb7daa907
1 changed files with 1 additions and 0 deletions
|
@ -106,6 +106,7 @@ static int json_stringify(lua_State *L)
|
||||||
flags |= JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_SPACED;
|
flags |= JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_SPACED;
|
||||||
|
|
||||||
lua_pushstring(L, json_object_to_json_string_ext(obj, flags));
|
lua_pushstring(L, json_object_to_json_string_ext(obj, flags));
|
||||||
|
json_object_put(obj);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue