aboutsummaryrefslogtreecommitdiff
path: root/src/lua.c
diff options
context:
space:
mode:
authorame <[email protected]>2024-04-17 23:48:12 -0500
committerame <[email protected]>2024-04-17 23:48:12 -0500
commit7ed170c58e9d9f8edab6e5226bf66d7a71c2222e (patch)
tree193acb90eaaa1dbcec61866ccc2f980ccd471dc9 /src/lua.c
parent98c89708fee01265ed3fa12cf8a658799467eb44 (diff)
web server mem leaks fixes
Diffstat (limited to 'src/lua.c')
-rw-r--r--src/lua.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lua.c b/src/lua.c
index 549a250..395481f 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -63,7 +63,7 @@ void i_dcopy(lua_State* src, lua_State* dest, void* _seen){
char aauwu[50] = {0};
sprintf(aauwu, "%p", lua_topointer(src, at2));
- int* sp = malloc(1);
+ //int* sp = malloc(1);
whar = parray_get(seen, aauwu);
if( whar != NULL){
//printf("%s\n",lua_tostring(src, at2 - 1));
@@ -77,8 +77,8 @@ void i_dcopy(lua_State* src, lua_State* dest, void* _seen){
//lua_pushinteger(dest, 55);
int r = luaL_ref(dest, LUA_REGISTRYINDEX);
lua_rawgeti(dest, LUA_REGISTRYINDEX, r);
- *sp = r;
- parray_set(seen, aauwu, sp);
+ //*sp = r;
+ parray_set(seen, aauwu, (void*)&r);
//printf("saved %i\n", *sp);
//for(int i = 0; i != seen->len; i++){
@@ -126,7 +126,7 @@ void i_dcopy(lua_State* src, lua_State* dest, void* _seen){
lua_pushnil(dest);
break;
}
- if(wnull) parray_clear(seen, 1);
+ if(wnull) parray_clear(seen, NONE);
//lua_settop(src, old_top);
_seen = seen;
-} \ No newline at end of file
+}