summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ffi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ffi.c b/ffi.c
index 693c700f..e5f70b3e 100644
--- a/ffi.c
+++ b/ffi.c
@@ -2379,6 +2379,7 @@ val carray_free(val carray)
if (carray->co.ops == &carray_owned_ops) {
free(scry->data);
scry->data = 0;
+ scry->nelem = 0;
} else {
uw_throwf(error_s, lit("~a: cannot free unowned carray ~s"),
self, carray, nao);