From 82a71432e4a68841fd3f01089889ca7822aeb24f Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Wed, 30 Jul 2025 13:00:12 -0700 Subject: [PATCH] [Rust] Don't leak the callbacks within DownloadInstance::perform_custom_request --- rust/src/download_provider.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/src/download_provider.rs b/rust/src/download_provider.rs index 9fd803a7de..d6fa0ccf99 100644 --- a/rust/src/download_provider.rs +++ b/rust/src/download_provider.rs @@ -253,6 +253,7 @@ impl DownloadInstance { ) }; + unsafe { drop(Box::from_raw(callbacks)) }; if result < 0 { unsafe { BNFreeDownloadInstanceResponse(response) }; return Err(self.get_error());