summaryrefslogtreecommitdiff
path: root/plugins/libcsem
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/libcsem')
-rw-r--r--plugins/libcsem/exit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/libcsem/exit.c b/plugins/libcsem/exit.c
index ee536b5..794369e 100644
--- a/plugins/libcsem/exit.c
+++ b/plugins/libcsem/exit.c
@@ -54,7 +54,7 @@ static void mark_one_kind_of_exit_as_return(const GLoadedBinary *binary, const c
GArchInstruction *instr; /* Instruction de sortie */
size_t count; /* Nbre de sources affichées */
size_t i; /* Boucle de parcours */
- instr_link_t *source; /* Instruction diverse liée */
+ const instr_link_t *source; /* Instruction diverse liée */
format = G_BIN_FORMAT(g_loaded_binary_get_format(binary));
@@ -81,9 +81,10 @@ static void mark_one_kind_of_exit_as_return(const GLoadedBinary *binary, const c
{
source = g_arch_instruction_get_source(instr, i);
- if (source->type != ILT_CALL) continue;
+ if (source->type == ILT_CALL)
+ g_arch_instruction_set_flag(source->linked, AIF_RETURN_POINT);
- g_arch_instruction_set_flag(source->linked, AIF_RETURN_POINT);
+ unref_instr_link(source);
}