Fix issues detected by Coverity (#1776)
- wasm_func_call always return trap if failed - in Debug, always run LEAK_TEST in samples/wasm-c-api
This commit is contained in:
@ -85,8 +85,10 @@ run(void *args_abs)
|
||||
|
||||
// Call.
|
||||
wasm_val_vec_t empty = WASM_EMPTY_VEC;
|
||||
if (wasm_func_call(run_func, &empty, &empty)) {
|
||||
wasm_trap_t *trap = wasm_func_call(run_func, &empty, &empty);
|
||||
if (trap) {
|
||||
printf("> Error calling function!\n");
|
||||
wasm_trap_delete(trap);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user