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());