summaryrefslogtreecommitdiff
path: root/rust/src
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-01-31 21:56:21 -0500
committerMason Reed <mason@vector35.com>2025-01-31 21:56:48 -0500
commit286d265497a840f06e4ccb321c9bc81139d2e9a2 (patch)
tree666b9d58606543eb6b6ee1346e55784ca4284f79 /rust/src
parentd4aabea6e7f32690e39140062f1829a180d7f698 (diff)
Fix double free in CoreCallingConvention::callee_saved_registers
Also added an assertion in the types unit test to catch it Fixes #6379
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/calling_convention.rs1
1 files changed, 0 insertions, 1 deletions
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<RegisterId> = std::slice::from_raw_parts(regs_ptr, count)
.iter()
.copied()