Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions rust/src/high_level_il/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,10 @@ impl HighLevelILFunction {
unsafe { BNGetHighLevelILExprCount(self.handle) }
}

pub fn ssa_form(&self) -> HighLevelILFunction {
pub fn ssa_form(&self) -> Ref<HighLevelILFunction> {
let ssa = unsafe { BNGetHighLevelILSSAForm(self.handle) };
assert!(!ssa.is_null());
HighLevelILFunction {
handle: ssa,
full_ast: self.full_ast,
}
unsafe { HighLevelILFunction::ref_from_raw(ssa, self.full_ast) }
}

pub fn function(&self) -> Ref<Function> {
Expand Down
4 changes: 2 additions & 2 deletions rust/src/medium_level_il/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ impl MediumLevelILFunction {
unsafe { BNGetMediumLevelILExprCount(self.handle) }
}

pub fn ssa_form(&self) -> MediumLevelILFunction {
pub fn ssa_form(&self) -> Ref<MediumLevelILFunction> {
let ssa = unsafe { BNGetMediumLevelILSSAForm(self.handle) };
assert!(!ssa.is_null());
MediumLevelILFunction { handle: ssa }
unsafe { MediumLevelILFunction::ref_from_raw(ssa) }
}

pub fn function(&self) -> Ref<Function> {
Expand Down
2 changes: 1 addition & 1 deletion rust/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl Metadata {
};
map.insert(key, value);
}

unsafe { BNFreeMetadataValueStore(ptr) };

Ok(map)
Expand Down
Loading