diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-06-25 06:32:19 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-06-25 06:32:19 -0700 |
commit | 7a923f282bb35692b9e307451c07a030e3d2c275 (patch) | |
tree | 75cc9d62ae2b7904e56957b492ce5cf02e481b33 | |
parent | 74e741e70471503a79547058d71ac40711b63b25 (diff) | |
download | txr-7a923f282bb35692b9e307451c07a030e3d2c275.tar.gz txr-7a923f282bb35692b9e307451c07a030e3d2c275.tar.bz2 txr-7a923f282bb35692b9e307451c07a030e3d2c275.zip |
ffi: fix leak in new union code.
* ffi.c (make_ffi_type_union): Create cobj with correct
cobj_ops structure: ffi_type_struct_ops, not
ffi_type_enum_ops.
-rw-r--r-- | ffi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2942,7 +2942,7 @@ static val make_ffi_type_union(val syntax, val lisp_type, cnum nmemb = c_num(length(types)), i; struct smemb *memb = coerce(struct smemb *, chk_calloc(nmemb, sizeof *memb)); - val obj = cobj(coerce(mem_t *, tft), ffi_type_s, &ffi_type_enum_ops); + val obj = cobj(coerce(mem_t *, tft), ffi_type_s, &ffi_type_struct_ops); ucnum most_align = 0; ucnum biggest_size = 0; const unsigned bits_int = 8 * sizeof(int); |