mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-20 09:11:01 +00:00
No memory leak please
This commit is contained in:
parent
bff6875b95
commit
d96719da67
1 changed files with 2 additions and 1 deletions
|
@ -337,10 +337,11 @@ static int setglobals(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
Z_Free(name);
|
||||
|
||||
if (LUA_CheckGlobals(L, csname))
|
||||
return 0;
|
||||
|
||||
Z_Free(name);
|
||||
return luaL_error(L, "Implicit global " LUA_QS " prevented. Create a local variable instead.", csname);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue