No memory leak please

This commit is contained in:
James R 2020-01-12 20:52:05 -08:00
parent bff6875b95
commit d96719da67

View file

@ -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);
}