diff options
author | Mike Pall <mike> | 2021-06-01 00:26:45 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2021-06-01 00:26:45 +0200 |
commit | ae533e3a6c009b5df79b11cd5787d249202fa69c (patch) | |
tree | d77b878898812e3f7f8d567826885fe657aefa41 /src | |
parent | c2cfa04231785116d9d198462830f41ef94147c0 (diff) | |
download | luajit-ae533e3a6c009b5df79b11cd5787d249202fa69c.tar.gz luajit-ae533e3a6c009b5df79b11cd5787d249202fa69c.tar.bz2 luajit-ae533e3a6c009b5df79b11cd5787d249202fa69c.zip |
FFI: Fix dangling reference to CType.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_cconv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lj_cconv.c b/src/lj_cconv.c index 9c1ecdf5..55a72657 100644 --- a/src/lj_cconv.c +++ b/src/lj_cconv.c | |||
@@ -557,7 +557,9 @@ void lj_cconv_ct_tv(CTState *cts, CType *d, | |||
557 | } | 557 | } |
558 | s = ctype_raw(cts, sid); | 558 | s = ctype_raw(cts, sid); |
559 | if (ctype_isfunc(s->info)) { | 559 | if (ctype_isfunc(s->info)) { |
560 | CTypeID did = ctype_typeid(cts, d); | ||
560 | sid = lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|sid), CTSIZE_PTR); | 561 | sid = lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|sid), CTSIZE_PTR); |
562 | d = ctype_get(cts, did); /* cts->tab may have been reallocated. */ | ||
561 | } else { | 563 | } else { |
562 | if (ctype_isenum(s->info)) s = ctype_child(cts, s); | 564 | if (ctype_isenum(s->info)) s = ctype_child(cts, s); |
563 | goto doconv; | 565 | goto doconv; |