From ee5063327e3ddefaa59ee2ff90e6e9f54eca2076 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 2 Feb 2025 19:34:27 -0500 Subject: Fix leaking BNDataVariableAndName when calling BNGetDebugDataVariableBy functions --- rust/src/variable.rs | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'rust/src/variable.rs') diff --git a/rust/src/variable.rs b/rust/src/variable.rs index 260e12d8..3fdc1177 100644 --- a/rust/src/variable.rs +++ b/rust/src/variable.rs @@ -119,12 +119,6 @@ impl NamedDataVariableWithType { owned } - pub(crate) unsafe fn from_ref_raw(value: *mut BNDataVariableAndName) -> Self { - let owned = Self::from_raw(&*value); - Self::free_ref_raw(value); - owned - } - pub(crate) fn into_raw(value: Self) -> BNDataVariableAndName { let bn_name = BnString::new(value.name); BNDataVariableAndName { @@ -136,10 +130,6 @@ impl NamedDataVariableWithType { } } - pub(crate) fn free_ref_raw(value: *mut BNDataVariableAndName) { - unsafe { BNFreeDataVariableAndName(value) } - } - pub(crate) fn free_raw(value: BNDataVariableAndName) { let _ = unsafe { Type::ref_from_raw(value.type_) }; let _ = unsafe { BnString::from_raw(value.name) }; -- cgit v1.3.1