diff options
Diffstat (limited to 'src/lj_state.c')
-rw-r--r-- | src/lj_state.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_state.c b/src/lj_state.c index e690a5d3..2287efca 100644 --- a/src/lj_state.c +++ b/src/lj_state.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "lj_meta.h" | 18 | #include "lj_meta.h" |
19 | #include "lj_state.h" | 19 | #include "lj_state.h" |
20 | #include "lj_frame.h" | 20 | #include "lj_frame.h" |
21 | #include "lj_mcode.h" | ||
21 | #include "lj_trace.h" | 22 | #include "lj_trace.h" |
22 | #include "lj_dispatch.h" | 23 | #include "lj_dispatch.h" |
23 | #include "lj_vm.h" | 24 | #include "lj_vm.h" |
@@ -143,7 +144,9 @@ static void close_state(lua_State *L) | |||
143 | global_State *g = G(L); | 144 | global_State *g = G(L); |
144 | #ifndef LUAJIT_USE_SYSMALLOC | 145 | #ifndef LUAJIT_USE_SYSMALLOC |
145 | if (g->allocf == lj_alloc_f) { | 146 | if (g->allocf == lj_alloc_f) { |
146 | lj_trace_freestate(g); | 147 | #if LJ_HASJIT |
148 | lj_mcode_free(G2J(g)); | ||
149 | #endif | ||
147 | lj_alloc_destroy(g->allocd); | 150 | lj_alloc_destroy(g->allocd); |
148 | } else | 151 | } else |
149 | #endif | 152 | #endif |