mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
free allocated buffer
This commit is contained in:
parent
6527fa558e
commit
84b5f0c91e
1 changed files with 4 additions and 1 deletions
|
@ -112,7 +112,10 @@ unsafe fn call_the_closure(closure_data_ptr: *const u8) -> i64 {
|
||||||
let output = &*(buffer as *mut RocCallResult<()>);
|
let output = &*(buffer as *mut RocCallResult<()>);
|
||||||
|
|
||||||
match output.into() {
|
match output.into() {
|
||||||
Ok(_) => 0,
|
Ok(_) => {
|
||||||
|
std::alloc::dealloc(buffer, layout);
|
||||||
|
0
|
||||||
|
}
|
||||||
Err(e) => panic!("failed with {}", e),
|
Err(e) => panic!("failed with {}", e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue