From 8e670bd3fd51601c45457b7b0aed90f982fe20b4 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Mon, 31 Aug 2015 19:56:00 +0200 Subject: [PATCH] Add patch "luci-lib-jsonc: Fix memory leak in stringify" --- ...-lib-jsonc-Fix-memory-leak-in-stringify.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 patches/packages/luci/0006-luci-lib-jsonc-Fix-memory-leak-in-stringify.patch diff --git a/patches/packages/luci/0006-luci-lib-jsonc-Fix-memory-leak-in-stringify.patch b/patches/packages/luci/0006-luci-lib-jsonc-Fix-memory-leak-in-stringify.patch new file mode 100644 index 00000000..4e21055a --- /dev/null +++ b/patches/packages/luci/0006-luci-lib-jsonc-Fix-memory-leak-in-stringify.patch @@ -0,0 +1,16 @@ +From: Jan-Philipp Litza +Date: Mon, 31 Aug 2015 19:52:36 +0200 +Subject: luci-lib-jsonc: Fix memory leak in stringify() + +diff --git a/libs/luci-lib-jsonc/src/jsonc.c b/libs/luci-lib-jsonc/src/jsonc.c +index 971fb12..b857c97 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; + } +