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 fd16c86c..5bd55237 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 | if (LJ_LIKELY(!cdataisv(cd))) { | 55 | if (LJ_LIKELY(!cdataisv(cd))) { |
56 | CType *ct = ctype_raw(ctype_ctsG(g), cd->typeid); | 56 | CType *ct = ctype_raw(ctype_ctsG(g), cd->typeid); |
57 | CTSize sz = ctype_hassize(ct->info) ? ct->size : CTSIZE_PTR; | 57 | CTSize sz = ctype_hassize(ct->info) ? ct->size : CTSIZE_PTR; |
58 | lua_assert(ctype_hassize(ct->info) || ctype_isfunc(ct->info)); | 58 | lua_assert(ctype_hassize(ct->info) || ctype_isfunc(ct->info) || |
59 | ctype_isextern(ct->info)); | ||
59 | lj_mem_free(g, cd, sizeof(GCcdata) + sz); | 60 | lj_mem_free(g, cd, sizeof(GCcdata) + sz); |
60 | } else { | 61 | } else { |
61 | lj_mem_free(g, memcdatav(cd), sizecdatav(cd)); | 62 | lj_mem_free(g, memcdatav(cd), sizecdatav(cd)); |