Skip to content

Commit e9af1f2

Browse files
Lipt0nasarg0d
authored andcommitted
Destroy argument buffer after invoking a foreign callback
Signed-off-by: Martynas Gurskas <[email protected]>
1 parent 74755c8 commit e9af1f2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

uniffi_core/src/ffi/callbackinterface.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ impl ForeignCallbackInternals {
182182
&mut ret_rbuf,
183183
)
184184
};
185+
RustBuffer::destroy(args);
185186
let result = CallbackResult::try_from(raw_result)
186187
.unwrap_or_else(|code| panic!("Callback failed with unexpected return code: {code}"));
187188
match result {

0 commit comments

Comments
 (0)