aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_gc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c
index 9c0d6797..25374d03 100644
--- a/src/lj_gc.c
+++ b/src/lj_gc.c
@@ -564,12 +564,11 @@ void lj_gc_finalize_cdata(lua_State *L)
564/* Free all remaining GC objects. */ 564/* Free all remaining GC objects. */
565void lj_gc_freeall(global_State *g) 565void lj_gc_freeall(global_State *g)
566{ 566{
567 MSize i, strmask; 567 MSize i;
568 /* Free everything, except super-fixed objects (the main thread). */ 568 /* Free everything, except super-fixed objects (the main thread). */
569 g->gc.currentwhite = LJ_GC_WHITES | LJ_GC_SFIXED; 569 g->gc.currentwhite = LJ_GC_WHITES | LJ_GC_SFIXED;
570 gc_fullsweep(g, &g->gc.root); 570 gc_fullsweep(g, &g->gc.root);
571 strmask = g->strmask; 571 for (i = g->strmask; i != ~(MSize)0; i--) /* Free all string hash chains. */
572 for (i = 0; i <= strmask; i++) /* Free all string hash chains. */
573 gc_fullsweep(g, &g->strhash[i]); 572 gc_fullsweep(g, &g->strhash[i]);
574} 573}
575 574