diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-05-12 09:53:02 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-05-12 09:53:02 (GMT) |
commit | 9f1fbd9d729056b624edea563b4cab8e58128b52 (patch) | |
tree | 2923f51ecc9cbf86bcd8af7bb96b213c0fee7c3a /plugins/arm | |
parent | eaf46c79d5b1db06f1f1f7da17a37ec007af2d92 (diff) |
Fixed some memory leaks.
Diffstat (limited to 'plugins/arm')
-rw-r--r-- | plugins/arm/v7/operands/reglist.c | 7 |
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)); } |