Skip to content
Snippets Groups Projects
Commit 5ed3fbe9 authored by Dmitry E. Oboukhov's avatar Dmitry E. Oboukhov
Browse files

Fixed memory leak in box.ipc.channel.

parent a6d73569
No related branches found
No related tags found
No related merge requests found
......@@ -149,13 +149,21 @@ lbox_ipc_channel_put(struct lua_State *L)
lua_pushnumber(L, rid);
lua_pushvalue(L, 2);
lua_settable(L, -4);
lua_settop(L, top);
if (ipc_channel_put_timeout(ch, (void *)rid, timeout) == 0)
lua_pushboolean(L, 1);
else
lua_pushboolean(L, 0);
int retval;
if (ipc_channel_put_timeout(ch, (void *)rid, timeout) == 0) {
retval = 1;
} else {
/* put timeout */
retval = 0;
lua_pushnumber(L, rid);
lua_pushnil(L);
lua_settable(L, -4);
}
lua_settop(L, top);
lua_pushboolean(L, retval);
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment