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/dalvik/operands | |
parent | eaf46c79d5b1db06f1f1f7da17a37ec007af2d92 (diff) |
Fixed some memory leaks.
Diffstat (limited to 'plugins/dalvik/operands')
-rw-r--r-- | plugins/dalvik/operands/register.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/dalvik/operands/register.c b/plugins/dalvik/operands/register.c index 71da97f..d2dd174 100644 --- a/plugins/dalvik/operands/register.c +++ b/plugins/dalvik/operands/register.c @@ -116,6 +116,7 @@ static void g_dalvik_register_operand_class_init(GDalvikRegisterOperandClass *kl static void g_dalvik_register_operand_init(GDalvikRegisterOperand *operand) { + operand->reg = NULL; operand->is_written = false; } @@ -135,6 +136,9 @@ static void g_dalvik_register_operand_init(GDalvikRegisterOperand *operand) static void g_dalvik_register_operand_dispose(GDalvikRegisterOperand *operand) { + if (operand->reg != NULL) + g_object_unref(G_OBJECT(operand->reg)); + G_OBJECT_CLASS(g_dalvik_register_operand_parent_class)->dispose(G_OBJECT(operand)); } |