Add more checks for wasm-c-api interfaces (#1121)

Protect c-api from unlinked runtime objects
Fix a potential memory leak
Remove unused `imports` in `wasm_instance_t`
This commit is contained in:
liang.he
2022-04-27 13:28:27 +08:00
committed by GitHub
parent 2007ba38cf
commit d7097fbce8
3 changed files with 84 additions and 55 deletions

View File

@ -1309,7 +1309,7 @@ wasm_runtime_finalize_call_function(WASMExecEnv *exec_env,
bh_assert((argv && ret_argv) || (argc == 0));
if (argv == ret_argv || argc == 0) {
if (argv == ret_argv) {
/* no need to transfrom externref results */
return true;
}