Fix issues reported by klocwork (#1060)

Fix issues reported by klocwork, fix host_tool compile error,
and update build script of benchmark jetstream
This commit is contained in:
Wenyong Huang
2022-03-24 17:34:22 +08:00
committed by GitHub
parent 7262aebf77
commit 5264ce4118
7 changed files with 31 additions and 13 deletions

View File

@ -322,7 +322,8 @@ wasm_engine_new()
singleton_engine =
wasm_engine_new_internal(Alloc_With_System_Allocator, NULL);
}
singleton_engine->ref_count++;
if (singleton_engine)
singleton_engine->ref_count++;
return singleton_engine;
}
@ -339,7 +340,8 @@ wasm_engine_new_with_args(mem_alloc_type_t type, const MemAllocOption *opts)
if (!singleton_engine) {
singleton_engine = wasm_engine_new_internal(type, opts);
}
singleton_engine->ref_count++;
if (singleton_engine)
singleton_engine->ref_count++;
return singleton_engine;
}