summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/analysis/disass/area.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/analysis/disass/area.c b/src/analysis/disass/area.c
index e19a4c0..030d58e 100644
--- a/src/analysis/disass/area.c
+++ b/src/analysis/disass/area.c
@@ -1259,7 +1259,20 @@ static void g_area_collector_dispose(GAreaCollector *collector)
static void g_area_collector_finalize(GAreaCollector *collector)
{
- if (collector->run == (run_task_fc)g_area_collector_do_collect)
+ if (collector->run == (run_task_fc)g_area_collector_do_compute)
+ {
+ /**
+ * Il s'agit de la seule procédure où les zones mises en place sont
+ * propres à un collecteur donné unique.
+ *
+ * Dans les autres cas, la liste est globale et partagée.
+ */
+ if (collector->areas != NULL)
+ free(collector->areas);
+
+ }
+
+ else if (collector->run == (run_task_fc)g_area_collector_do_collect)
{
if (collector->collected != NULL)
free(collector->collected);
@@ -1565,7 +1578,6 @@ mem_area *collect_memory_areas(wgroup_id_t gid, GtkStatusStack *status, GLoadedB
collectors[i] = g_area_collector_new_intro(id, binary, first, last, closing);
- g_object_ref(G_OBJECT(collectors[i]));
g_work_queue_schedule_work(queue, G_DELAYED_WORK(collectors[i]), gid);
}
@@ -1794,7 +1806,6 @@ void populate_fresh_memory_areas(wgroup_id_t gid, GtkStatusStack *status, mem_ar
collectors[i] = g_area_collector_new_insert(id, areas, count, info, start, stop);
- g_object_ref(G_OBJECT(collectors[i]));
g_work_queue_schedule_work(queue, G_DELAYED_WORK(collectors[i]), gid);
}
@@ -1933,7 +1944,6 @@ GArchInstruction **collect_disassembled_instructions(wgroup_id_t gid, GtkStatusS
collectors[i] = g_area_collector_new_outro(id, list, begin, end);
- g_object_ref(G_OBJECT(collectors[i]));
g_work_queue_schedule_work(queue, G_DELAYED_WORK(collectors[i]), gid);
}