summaryrefslogtreecommitdiff
path: root/src/tools/wasm2wast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wasm2wast.c')
-rw-r--r--src/tools/wasm2wast.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/wasm2wast.c b/src/tools/wasm2wast.c
index fd94b8ec..55050f96 100644
--- a/src/tools/wasm2wast.c
+++ b/src/tools/wasm2wast.c
@@ -189,10 +189,11 @@ int main(int argc, char** argv) {
wasm_close_file_writer(&file_writer);
}
}
+
+ if (s_use_libc_allocator)
+ wasm_destroy_module(allocator, &module);
}
- if (s_use_libc_allocator)
- wasm_destroy_module(allocator, &module);
wasm_free(allocator, data);
wasm_print_allocator_stats(allocator);
wasm_destroy_allocator(allocator);