diff options
Diffstat (limited to 'src/analysis/disass/area.c')
-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 84bf8a4..f1aa002 100644 --- a/src/analysis/disass/area.c +++ b/src/analysis/disass/area.c @@ -348,8 +348,7 @@ static void fini_mem_area(mem_area *area) len = get_mrange_length(&area->range); for (i = 0; i < len; i++) - if (area->instructions[i] != NULL) - g_object_unref(G_OBJECT(area->instructions[i])); + g_clear_object(&area->instructions[i]); free(area->instructions); @@ -681,7 +680,10 @@ static void update_address_as_routine(GBinFormat *format, const vmpa2t *addr) if (!found || (found && wrong_type)) { if (found) + { g_binary_format_remove_symbol(format, symbol); + g_object_unref(G_OBJECT(symbol)); + } init_mrange(&range, addr, 0); |