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:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user