mirror of
https://github.com/nmap/nmap.git
synced 2026-01-02 21:09:00 +00:00
Get the closure from the library, don't make a new one.
This commit is contained in:
@@ -268,7 +268,7 @@ static int ip_send (lua_State *L)
|
||||
memcpy(eth.dstmac, dstmac, sizeof(eth.dstmac));
|
||||
|
||||
/* close any current ethernet associated with this userdata */
|
||||
lua_pushcfunction(L, ethernet_close);
|
||||
lua_getfield(L, 1, "ethernet_close");
|
||||
lua_pushvalue(L, 1);
|
||||
lua_call(L, 1, 0);
|
||||
|
||||
@@ -294,10 +294,10 @@ static int gc (lua_State *L)
|
||||
{
|
||||
nseU_checkudata(L, 1, DNET_METATABLE, "dnet");
|
||||
|
||||
lua_pushcfunction(L, ip_close);
|
||||
lua_getfield(L, 1, "ip_close");
|
||||
lua_pushvalue(L, 1);
|
||||
lua_call(L, 1, 0);
|
||||
lua_pushcfunction(L, ethernet_close);
|
||||
lua_getfield(L, 1, "ethernet_close");
|
||||
lua_pushvalue(L, 1);
|
||||
lua_call(L, 1, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user