Commit 700ba55d authored by dnc40085's avatar dnc40085
Browse files

Fix for memory leak in function wifi.sta.getap()

parent 19232805
...@@ -86,6 +86,11 @@ static void wifi_scan_done(void *arg, STATUS status) ...@@ -86,6 +86,11 @@ static void wifi_scan_done(void *arg, STATUS status)
lua_pushnil(gL); lua_pushnil(gL);
} }
lua_call(gL, 1, 0); lua_call(gL, 1, 0);
if(wifi_scan_succeed != LUA_NOREF)
{
luaL_unref(gL, LUA_REGISTRYINDEX, wifi_scan_succeed);
wifi_scan_succeed = LUA_NOREF;
}
} }
// Lua: smart(channel, function succeed_cb) // Lua: smart(channel, function succeed_cb)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment