diff --git a/crates/bench-api/src/lib.rs b/crates/bench-api/src/lib.rs index 0806f43bb6..72b27116fa 100644 --- a/crates/bench-api/src/lib.rs +++ b/crates/bench-api/src/lib.rs @@ -348,7 +348,7 @@ pub extern "C" fn wasm_bench_create( pub extern "C" fn wasm_bench_free(state: *mut c_void) { assert!(!state.is_null()); unsafe { - Box::from_raw(state as *mut BenchState); + drop(Box::from_raw(state as *mut BenchState)); } }