File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,14 @@ impl FlowGraph {
5858 pub fn low_level_il ( & self ) -> Result < Ref < RegularLowLevelILFunction < CoreArchitecture > > , ( ) > {
5959 unsafe {
6060 let llil_ptr = BNGetFlowGraphLowLevelILFunction ( self . handle ) ;
61- let func_ptr = BNGetLowLevelILOwnerFunction ( llil_ptr) ;
62- let arch_ptr = BNGetFunctionArchitecture ( func_ptr) ;
63- let arch = CoreArchitecture :: from_raw ( arch_ptr) ;
64- BNFreeFunction ( func_ptr) ;
6561 match llil_ptr. is_null ( ) {
66- false => Ok ( RegularLowLevelILFunction :: ref_from_raw ( arch, llil_ptr) ) ,
62+ false => {
63+ let func_ptr = BNGetLowLevelILOwnerFunction ( llil_ptr) ;
64+ let arch_ptr = BNGetFunctionArchitecture ( func_ptr) ;
65+ let arch = CoreArchitecture :: from_raw ( arch_ptr) ;
66+ BNFreeFunction ( func_ptr) ;
67+ Ok ( RegularLowLevelILFunction :: ref_from_raw ( arch, llil_ptr) )
68+ } ,
6769 true => Err ( ( ) ) ,
6870 }
6971 }
You can’t perform that action at this time.
0 commit comments