diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-27 13:21:53 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-27 16:59:17 -0700 |
commit | 2c8e64a91197beed1792e65a9d409ca50e12697c (patch) | |
tree | f992be235bde21bc5d92709caebf0d49ae5485e6 | |
parent | f4aaf7bfce3808c95554100606cc73916a09fc44 (diff) | |
download | binaryen-2c8e64a91197beed1792e65a9d409ca50e12697c.tar.gz binaryen-2c8e64a91197beed1792e65a9d409ca50e12697c.tar.bz2 binaryen-2c8e64a91197beed1792e65a9d409ca50e12697c.zip |
clean up import if not passed to wasm module in asm2wasm
-rw-r--r-- | src/asm2wasm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index f39c50871..9e7bc7979 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -519,6 +519,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) { if (type != WasmType::none) { // wasm has no imported constants, so allocate a global, and we need to write the value into that allocateGlobal(name, type, true, import->module, import->base); + delete import; } else { wasm.addImport(import); } |