Skip to content

Commit

Permalink
Use SC allocataor
Browse files Browse the repository at this point in the history
  • Loading branch information
J0eJ0h committed Jan 26, 2024
1 parent c5c4306 commit 0ddce7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util-lua-sandbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ LUALIB_API void sb_loadrestricted(lua_State *L)

lua_State *sb_newstate(uint64_t alloclimit, uint64_t instructionlimit)
{
sb_lua_state *sb = malloc(sizeof(sb_lua_state));
sb_lua_state *sb = SCMalloc(sizeof(sb_lua_state));
sb->alloc_limit = alloclimit;
sb->alloc_bytes = 0;
sb->hook_instruction_count = 100;
Expand Down Expand Up @@ -169,7 +169,7 @@ void sb_close(lua_State *L)
{
sb_lua_state *sb = sb_get_ctx(L);
lua_close(sb->L);
free(sb);
SCFree(sb);
}

static void sb_hook(lua_State *L, lua_Debug *ar)
Expand Down

0 comments on commit 0ddce7f

Please sign in to comment.