diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-08-03 11:24:26 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-08-03 11:24:26 (GMT) |
commit | 4d179bc994cf85832d08f468c7e4122ad23e9244 (patch) | |
tree | 3348d3c001c961e9e464a644c12c9fc85e78d9b5 /src/analysis/disass/links.c | |
parent | 77735c8c77497498e3beb4f5bcec7de3b592fcbd (diff) |
Updated the reference counters when providing instruction links.
Diffstat (limited to 'src/analysis/disass/links.c')
-rw-r--r-- | src/analysis/disass/links.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/analysis/disass/links.c b/src/analysis/disass/links.c index ffdee36..381aedc 100644 --- a/src/analysis/disass/links.c +++ b/src/analysis/disass/links.c @@ -56,7 +56,7 @@ void establish_natural_link(GArchInstruction *instr, GArchInstruction *prev) { size_t count; /* Nbre de sources affichées */ bool has_src; /* Présence de sources ? */ - instr_link_t *other; /* Instruction diverse liée */ + const instr_link_t *other; /* Instruction diverse liée */ size_t i; /* Boucle de parcours */ bool no_natural; /* Aucun lien naturel présent */ bool no_need; /* Pas de besoin pour ce lien */ @@ -79,6 +79,8 @@ void establish_natural_link(GArchInstruction *instr, GArchInstruction *prev) if (other->type != ILT_REF) has_src = true; + unref_instr_link(other); + } g_arch_instruction_unlock_src(instr); @@ -135,6 +137,8 @@ void establish_natural_link(GArchInstruction *instr, GArchInstruction *prev) } + unref_instr_link(other); + } check_done: @@ -173,6 +177,8 @@ void establish_natural_link(GArchInstruction *instr, GArchInstruction *prev) } + unref_instr_link(other); + } g_arch_instruction_unlock_src(instr); |