summaryrefslogtreecommitdiff
path: root/plugins/arm/v7/operands/reglist.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-05-19 11:27:16 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-05-19 11:27:16 (GMT)
commitc930f8b060034abefbae48ad76a9b8d1e55b1ec9 (patch)
tree9461b8002a833f9db443b8859045a30e575b13c8 /plugins/arm/v7/operands/reglist.c
parent5e6f3a42a2f57c563f34e5ea4d9c377d8618e871 (diff)
Tracked deeper the reference counts for ARMv7 registers.
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;
}