diff options
Diffstat (limited to 'plugins/libcsem')
-rw-r--r-- | plugins/libcsem/exit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/libcsem/exit.c b/plugins/libcsem/exit.c index cbfec64..20511aa 100644 --- a/plugins/libcsem/exit.c +++ b/plugins/libcsem/exit.c @@ -70,6 +70,9 @@ static void mark_one_kind_of_exit_as_return(const GLoadedBinary *binary, const c instr = g_arch_processor_find_instr_by_address(proc, get_mrange_addr(range)); + if (instr == NULL) + goto mokoear_not_found; + g_arch_instruction_rlock_src(instr); count = g_arch_instruction_get_sources(instr, &sources); @@ -83,6 +86,10 @@ static void mark_one_kind_of_exit_as_return(const GLoadedBinary *binary, const c g_arch_instruction_runlock_src(instr); + g_object_unref(G_OBJECT(instr)); + + mokoear_not_found: + g_object_unref(G_OBJECT(proc)); mokoear_done_with_sym: |