Commit d941e9e4b453fc7185b9f21d43867ac8fa2b3989

Thomas de Grivel 2023-09-20T00:11:40

wip asan

diff --git a/libc3/array.c b/libc3/array.c
index 02a6964..4a204e6 100644
--- a/libc3/array.c
+++ b/libc3/array.c
@@ -25,10 +25,18 @@
 
 void array_clean (s_array *a)
 {
+  uw i;
   assert(a);
   free(a->dimensions);
   free(a->data);
-  free(a->tags);
+  if (a->tags) {
+    i = 0;
+    while (i < a->count) {
+      tag_clean(a->tags + i);
+      i++;
+    }
+    free(a->tags);
+  }
 }
 
 s_array * array_copy (const s_array *src, s_array *dest)