luci-lib-jsonc: Fix memory leak in stringify()

This commit is contained in:
Jan-Philipp Litza 2015-08-31 19:52:36 +02:00
parent c0e2255ae9
commit 90c841d66e

View file

@ -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;
}