From 286d265497a840f06e4ccb321c9bc81139d2e9a2 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 31 Jan 2025 21:56:21 -0500 Subject: Fix double free in CoreCallingConvention::callee_saved_registers Also added an assertion in the types unit test to catch it Fixes #6379 --- rust/src/calling_convention.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'rust/src') diff --git a/rust/src/calling_convention.rs b/rust/src/calling_convention.rs index 929cc26b..9c1493e1 100644 --- a/rust/src/calling_convention.rs +++ b/rust/src/calling_convention.rs @@ -574,7 +574,6 @@ impl CallingConvention for CoreCallingConvention { unsafe { let mut count = 0; let regs_ptr = BNGetCalleeSavedRegisters(self.handle, &mut count); - BNFreeRegisterList(regs_ptr); let regs: Vec = std::slice::from_raw_parts(regs_ptr, count) .iter() .copied() -- cgit v1.3.1