summaryrefslogtreecommitdiff
path: root/src/binary-reader-ast.c
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-12-15 13:56:06 -0800
committerBen Smith <binji@chromium.org>2016-12-15 15:22:45 -0800
commit8d0fcc1fe04fd3497795a01c692667d7d47f3441 (patch)
tree12cc82b236bc1aa376d60bd9a22ece577dfc10c7 /src/binary-reader-ast.c
parent180003ae092d1f083a1142fd5966aa5c24664cf8 (diff)
downloadwabt-8d0fcc1fe04fd3497795a01c692667d7d47f3441.tar.gz
wabt-8d0fcc1fe04fd3497795a01c692667d7d47f3441.tar.bz2
wabt-8d0fcc1fe04fd3497795a01c692667d7d47f3441.zip
Update testsuite to f71cbe72bd5f4fb871bee39a9dc1278fa662a8a5
Diffstat (limited to 'src/binary-reader-ast.c')
-rw-r--r--src/binary-reader-ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/binary-reader-ast.c b/src/binary-reader-ast.c
index e82b82c2..68c49be7 100644
--- a/src/binary-reader-ast.c
+++ b/src/binary-reader-ast.c
@@ -1163,5 +1163,7 @@ WasmResult wasm_read_binary_ast(struct WasmAllocator* allocator,
WasmResult result =
wasm_read_binary(allocator, data, size, &reader, 1, options);
WASM_DESTROY_VECTOR_AND_ELEMENTS(allocator, ctx.label_stack, label_node);
+ if (WASM_FAILED(result))
+ wasm_destroy_module(allocator, out_module);
return result;
}