Skip to content

Commit

Permalink
Add probable fix of memory leak in trampoline code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark McCaskey committed Nov 2, 2019
1 parent e115d35 commit 8d95e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/runtime-c-api/src/trampoline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub unsafe extern "C" fn wasmer_trampoline_buffer_builder_build(
#[allow(clippy::cast_ptr_alignment)]
pub unsafe extern "C" fn wasmer_trampoline_buffer_destroy(buffer: *mut wasmer_trampoline_buffer_t) {
if !buffer.is_null() {
Box::from_raw(buffer);
Box::from_raw(buffer as *mut TrampolineBuffer);
}
}

Expand Down

0 comments on commit 8d95e63

Please sign in to comment.