free allocated buffer

This commit is contained in:
Folkert 2021-08-26 23:28:11 +02:00
parent 6527fa558e
commit 84b5f0c91e

View File

@ -112,7 +112,10 @@ unsafe fn call_the_closure(closure_data_ptr: *const u8) -> i64 {
let output = &*(buffer as *mut RocCallResult<()>);
match output.into() {
Ok(_) => 0,
Ok(_) => {
std::alloc::dealloc(buffer, layout);
0
}
Err(e) => panic!("failed with {}", e),
}
}