diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-02-07 19:23:14 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-02-07 19:23:14 (GMT) |
commit | 3da6844c02f4041998ec655c19c7987e875adaf8 (patch) | |
tree | 752627c9e62043674df6700cf845ace3b4cf49ba /src/analysis/disass | |
parent | 7b3ca7accd4103bb5069d31b2389ea76c57846ca (diff) |
Fixed extra GObjects leaks.
Diffstat (limited to 'src/analysis/disass')
-rw-r--r-- | src/analysis/disass/area.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/analysis/disass/area.c b/src/analysis/disass/area.c index f1aa002..9649d6f 100644 --- a/src/analysis/disass/area.c +++ b/src/analysis/disass/area.c @@ -277,15 +277,17 @@ static void init_mem_area_from_addr(mem_area *area, const vmpa2t *addr, phys_t l area->format = G_BIN_FORMAT(g_loaded_binary_get_format(binary)); - content = g_binary_format_get_content(area->format); - area->proc = g_loaded_binary_get_processor(binary); area->endianness = g_arch_processor_get_endianness(area->proc); init_mrange(&area->range, addr, len); + content = g_binary_format_get_content(area->format); + area->content = g_restricted_content_new(content, &area->range); + g_object_unref(G_OBJECT(content)); + switch (g_arch_processor_get_instruction_min_size(area->proc)) { case MDS_4_BITS: |