fix(lua): only free luarefs when returning from API (#28373)

This commit is contained in:
zeertzjq
2024-04-17 05:44:06 +08:00
committed by GitHub
parent 8e5c48b08d
commit f150b62423
6 changed files with 81 additions and 35 deletions

View File

@@ -449,7 +449,7 @@ int nlua_getvar(lua_State *lstate)
if (di == NULL) {
return 0; // nil
}
nlua_push_typval(lstate, &di->di_tv, false);
nlua_push_typval(lstate, &di->di_tv, 0);
return 1;
}