mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-11 17:35:13 +00:00
Fix sgx enclave module not destroyed issue when loading module failed (#410)
This commit is contained in:
parent
78c525d21c
commit
dc536538ad
|
@ -148,6 +148,7 @@ handle_cmd_load_module(uint64 *args, uint32 argc)
|
||||||
if (!(enclave_module->module =
|
if (!(enclave_module->module =
|
||||||
wasm_runtime_load(enclave_module->wasm_file, wasm_file_size,
|
wasm_runtime_load(enclave_module->wasm_file, wasm_file_size,
|
||||||
error_buf, error_buf_size))) {
|
error_buf, error_buf_size))) {
|
||||||
|
wasm_runtime_free(enclave_module);
|
||||||
*(void **)args_org = NULL;
|
*(void **)args_org = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user