mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 13:41:32 +00:00
fix(runtime-core) Drop vm::FuncCtx
if not null.
This commit is contained in:
@ -563,7 +563,9 @@ impl Drop for ImportBacking {
|
|||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
// Properly drop the `vm::FuncCtx` in `vm::ImportedFunc`.
|
// Properly drop the `vm::FuncCtx` in `vm::ImportedFunc`.
|
||||||
for (_imported_func_index, imported_func) in (*self.vm_functions).iter_mut() {
|
for (_imported_func_index, imported_func) in (*self.vm_functions).iter_mut() {
|
||||||
let _: Box<vm::FuncCtx> = unsafe { Box::from_raw(imported_func.func_ctx.as_ptr()) };
|
if !imported_func.func_ctx.as_ptr().is_null() {
|
||||||
|
let _: Box<vm::FuncCtx> = unsafe { Box::from_raw(imported_func.func_ctx.as_ptr()) };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user