lua: fix memory leak problem

Signed-off-by: Chen Bin <ewolfok@126.com>
This commit is contained in:
陈斌 2015-05-13 13:52:22 +08:00 committed by Felix Fietkau
parent 2c30506a4f
commit f361bfa5fc

View 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);