summaryrefslogtreecommitdiff
path: root/plugins/arm/v7/operands/reglist.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/arm/v7/operands/reglist.c')
-rw-r--r--plugins/arm/v7/operands/reglist.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/arm/v7/operands/reglist.c b/plugins/arm/v7/operands/reglist.c
index 005aff7..33a3fcd 100644
--- a/plugins/arm/v7/operands/reglist.c
+++ b/plugins/arm/v7/operands/reglist.c
@@ -364,9 +364,15 @@ size_t g_armv7_reglist_count_registers(const GArmV7RegListOperand *operand)
GArmV7Register *g_armv7_reglist_operand_get_register(const GArmV7RegListOperand *operand, size_t index)
{
+ GArmV7Register *result; /* Instance à retourner */
+
assert(index < operand->count);
- return operand->registers[index];
+ result = operand->registers[index];
+
+ g_object_ref(G_OBJECT(result));
+
+ return result;
}