diff options
Diffstat (limited to 'plugins/arm')
-rw-r--r-- | plugins/arm/context.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/arm/context.c b/plugins/arm/context.c index 6b62760..8f6ab52 100644 --- a/plugins/arm/context.c +++ b/plugins/arm/context.c @@ -140,6 +140,9 @@ static void g_arm_context_dispose(GArmContext *ctx) static void g_arm_context_finalize(GArmContext *ctx) { + if (ctx->areas != NULL) + free(ctx->areas); + G_OBJECT_CLASS(g_arm_context_parent_class)->finalize(G_OBJECT(ctx)); } @@ -240,7 +243,7 @@ void _g_arm_context_define_encoding(GArmContext *ctx, virt_t addr, unsigned int /* Sinon on redivise... */ else { - ctx->areas = (disass_arm_area *)realloc(ctx->areas, ++ctx->acount * sizeof(disass_arm_area)); + ctx->areas = realloc(ctx->areas, ++ctx->acount * sizeof(disass_arm_area)); memmove(&ctx->areas[selected + 1], &ctx->areas[selected], (ctx->acount - selected - 1) * sizeof(disass_arm_area)); |