lua: fix memory leak problem
author陈斌 <ewolfok@126.com>
Wed, 13 May 2015 05:52:22 +0000 (13:52 +0800)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 25 May 2015 21:06:19 +0000 (23:06 +0200)
Signed-off-by: Chen Bin <ewolfok@126.com>
lua/ubus.c

index 362f9327ecb6225929fa8cad3ea480d69f7f99e5..a48fb7dd443c09bbf2e1782c89d9b6d7e96100b1 100644 (file)
@@ -681,6 +681,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);