summaryrefslogtreecommitdiff
path: root/src/analysis/disass
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-05-23 21:24:17 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-05-23 21:24:17 (GMT)
commit3d2576f58690dc3069d918f5a737192028e45f8b (patch)
treebf7ba151d4e610d693dc552adc3aa2b8f1e62c42 /src/analysis/disass
parent1c96d0ae943b45f71954c1772aa94f78bafdf656 (diff)
Fixed memory leaks by destroying delayed works after processing.
Diffstat (limited to 'src/analysis/disass')
-rw-r--r--src/analysis/disass/area.c2
-rw-r--r--src/analysis/disass/output.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/analysis/disass/area.c b/src/analysis/disass/area.c
index 030d58e..06893ff 100644
--- a/src/analysis/disass/area.c
+++ b/src/analysis/disass/area.c
@@ -1578,6 +1578,7 @@ 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);
}
@@ -1944,6 +1945,7 @@ 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);
}
diff --git a/src/analysis/disass/output.c b/src/analysis/disass/output.c
index 40cd12b..063280c 100644
--- a/src/analysis/disass/output.c
+++ b/src/analysis/disass/output.c
@@ -344,6 +344,8 @@ void print_disassembled_instructions(GBufferCache *cache, GCodingLanguage *lang,
assert(comment_index == comment_count);
+ _g_preload_info_drain_comments(info);
+
g_preload_info_unlock_comments(info);
gtk_status_stack_remove_activity(status, id);