summaryrefslogtreecommitdiff
path: root/src/wasm-vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-vector.h')
-rw-r--r--src/wasm-vector.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm-vector.h b/src/wasm-vector.h
index d67175cd..7a508138 100644
--- a/src/wasm-vector.h
+++ b/src/wasm-vector.h
@@ -74,6 +74,9 @@
void wasm_destroy_##name##_vector(struct WasmAllocator* allocator, \
type##Vector* vec) { \
wasm_free(allocator, vec->data); \
+ vec->data = NULL; \
+ vec->size = 0; \
+ vec->capacity = 0; \
} \
WasmResult wasm_resize_##name##_vector(struct WasmAllocator* allocator, \
type##Vector* vec, size_t size) { \