[OpenWrt-Devel] libubus-lua: fix memory leak problem

陈斌 ewolfok at 126.com
Thu Jul 16 05:31:56 EDT 2015


HI, all

this is another patch  to fix libubus's  lua memory leak problem (lua stack corrupted)

Best regards

Signed-off-by:Chen Bin <ewolfok at 126.com>
---
--- a/lua/ubus.c
+++ b/lua/ubus.c
@@ -302,8 +302,9 @@ ubus_method_handler(struct ubus_context
 		lua_call(state, 2, 1);
 		if (lua_isnumber(state, -1))
 			rv = lua_tonumber(state, -1);
-	} else
-		lua_pop(state, 1);
+	}
+
+	lua_pop(state, 1);

 	return rv;
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150716/9975c5b3/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list