diff mbox

[OpenWrt-Devel,package] ubus: fix memory leak problem

Message ID 77c8fd05.9423.14d4bd4bd43.Coremail.ewolfok@126.com
State Accepted
Headers show

Commit Message

陈斌 May 13, 2015, 5:52 a.m. UTC
HI, all

this is a patch try to fix libubus-lua's memory leak problem

Best regards

Signed-off-by:Chen Bin <ewolfok@126.com>
---
diff mbox

Patch

--- a/lua/ubus.c
+++ b/lua/ubus.c
@@ -666,6 +666,7 @@  ubus_lua__gc(lua_State *L)
 {
 	struct ubus_lua_connection *c = luaL_checkudata(L, 1, METANAME);
 
+	blob_buf_free(&c->buf);
 	if (c->ctx != NULL)
 	{
 		ubus_free(c->ctx);