summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-08-03 11:24:26 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-08-03 11:24:26 (GMT)
commit4d179bc994cf85832d08f468c7e4122ad23e9244 (patch)
tree3348d3c001c961e9e464a644c12c9fc85e78d9b5 /src/gtkext
parent77735c8c77497498e3beb4f5bcec7de3b592fcbd (diff)
Updated the reference counters when providing instruction links.
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/graph/cluster.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gtkext/graph/cluster.c b/src/gtkext/graph/cluster.c
index 57c1bfb..a156bfa 100644
--- a/src/gtkext/graph/cluster.c
+++ b/src/gtkext/graph/cluster.c
@@ -921,7 +921,7 @@ static void g_graph_cluster_define_links(GGraphCluster *cluster, GHashTable *all
GArchInstruction *last; /* Dernière instruction du bloc*/
size_t dcount; /* Nombre de liens de dest. */
size_t i; /* Boucle de parcours #1 */
- instr_link_t *dest; /* Instr. visée par une autre */
+ const instr_link_t *dest; /* Instr. visée par une autre */
GGraphCluster *target; /* Bloc ciblé par un lien */
leaving_edge *leaving; /* Point de départ d'un lien */
unsigned int target_level; /* Rang du bloc ciblé */
@@ -1045,6 +1045,8 @@ static void g_graph_cluster_define_links(GGraphCluster *cluster, GHashTable *all
}
+ unref_instr_link(dest);
+
}
g_arch_instruction_unlock_dest(last);
@@ -1530,7 +1532,7 @@ static GGraphCluster *setup_graph_clusters(GLoadedBinary *binary, const GBlockLi
#endif
size_t dcount; /* Nombre de liens de dest. */
size_t i; /* Boucle de parcours #1 */
- instr_link_t *dest; /* Instr. visée par une autre */
+ const instr_link_t *dest; /* Instr. visée par une autre */
GBasicBlock *target; /* Bloc ciblé par un lien */
size_t j; /* Boucle de parcours #2 */
bool changed; /* Un ajout a été effectué ? */
@@ -1641,6 +1643,8 @@ static GGraphCluster *setup_graph_clusters(GLoadedBinary *binary, const GBlockLi
}
+ unref_instr_link(dest);
+
}
g_arch_instruction_unlock_dest(last);