diff options
Diffstat (limited to 'src/lj_cdata.c')
-rw-r--r-- | src/lj_cdata.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_cdata.c b/src/lj_cdata.c index d01cf62a..497b84ee 100644 --- a/src/lj_cdata.c +++ b/src/lj_cdata.c | |||
@@ -55,7 +55,8 @@ void LJ_FASTCALL lj_cdata_free(global_State *g, GCcdata *cd) | |||
55 | { | 55 | { |
56 | if (LJ_UNLIKELY(cd->marked & LJ_GC_CDATA_FIN)) { | 56 | if (LJ_UNLIKELY(cd->marked & LJ_GC_CDATA_FIN)) { |
57 | GCobj *root; | 57 | GCobj *root; |
58 | cd->marked = curwhite(g) | LJ_GC_FINALIZED; | 58 | makewhite(g, obj2gco(cd)); |
59 | obj2gco(cd)->gch.marked |= LJ_GC_FINALIZED; | ||
59 | if ((root = gcref(g->gc.mmudata)) != NULL) { | 60 | if ((root = gcref(g->gc.mmudata)) != NULL) { |
60 | setgcrefr(cd->nextgc, root->gch.nextgc); | 61 | setgcrefr(cd->nextgc, root->gch.nextgc); |
61 | setgcref(root->gch.nextgc, obj2gco(cd)); | 62 | setgcref(root->gch.nextgc, obj2gco(cd)); |