From 052a8d2adb0c7899ae875c03da4edf80b2fa1a81 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Wed, 20 Sep 2023 14:40:22 -0400 Subject: Rust API : FFI Fix, was leaking some non-null-terminated strings to the core..fix passing a nullptr to `load` --- rust/src/downloadprovider.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rust/src/downloadprovider.rs') diff --git a/rust/src/downloadprovider.rs b/rust/src/downloadprovider.rs index 441714b6..4ba07dbe 100644 --- a/rust/src/downloadprovider.rs +++ b/rust/src/downloadprovider.rs @@ -157,7 +157,7 @@ impl DownloadInstance { }; // Drop it - unsafe { Box::from_raw(callbacks) }; + unsafe { drop(Box::from_raw(callbacks)) }; if result < 0 { Err(self.get_error()) } else { -- cgit v1.3.1