summaryrefslogtreecommitdiff
path: root/plugins/arm
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/arm')
-rw-r--r--plugins/arm/v7/operands/reglist.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/arm/v7/operands/reglist.c b/plugins/arm/v7/operands/reglist.c
index 9fe9245..5fc1f08 100644
--- a/plugins/arm/v7/operands/reglist.c
+++ b/plugins/arm/v7/operands/reglist.c
@@ -120,6 +120,8 @@ static void g_armv7_reglist_operand_class_init(GArmV7RegListOperandClass *klass)
static void g_armv7_reglist_operand_init(GArmV7RegListOperand *operand)
{
+ operand->registers = NULL;
+ operand->count = 0;
}
@@ -138,6 +140,11 @@ static void g_armv7_reglist_operand_init(GArmV7RegListOperand *operand)
static void g_armv7_reglist_operand_dispose(GArmV7RegListOperand *operand)
{
+ size_t i; /* Boucle de parcours */
+
+ for (i = 0; i < operand->count; i++)
+ g_object_unref(G_OBJECT(operand->registers[i]));
+
G_OBJECT_CLASS(g_armv7_reglist_operand_parent_class)->dispose(G_OBJECT(operand));
}