mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
Fix memory leak, See #952
This commit is contained in:
Submodule 3rd/jemalloc updated: 61efbda709...896ed3a8b3
@@ -133,6 +133,7 @@ mc_remote(lua_State *L) {
|
|||||||
lua_pushlightuserdata(L, pack->data);
|
lua_pushlightuserdata(L, pack->data);
|
||||||
lua_pushinteger(L, (lua_Integer)(pack->size));
|
lua_pushinteger(L, (lua_Integer)(pack->size));
|
||||||
skynet_free(pack);
|
skynet_free(pack);
|
||||||
|
skynet_free(ptr);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,10 @@ skynet.register_protocol {
|
|||||||
unpack = function(msg, sz)
|
unpack = function(msg, sz)
|
||||||
return mc.packremote(msg, sz)
|
return mc.packremote(msg, sz)
|
||||||
end,
|
end,
|
||||||
dispatch = publish,
|
dispatch = function (...)
|
||||||
|
skynet.ignoreret()
|
||||||
|
publish(...)
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- publish a message, if the caller is remote, forward the message to the owner node (by remote_publish)
|
-- publish a message, if the caller is remote, forward the message to the owner node (by remote_publish)
|
||||||
|
|||||||
Reference in New Issue
Block a user