summaryrefslogtreecommitdiff
path: root/src/arch/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/link.c')
-rw-r--r--src/arch/link.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/arch/link.c b/src/arch/link.c
index fbcd391..2e8e455 100644
--- a/src/arch/link.c
+++ b/src/arch/link.c
@@ -61,9 +61,7 @@ void handle_jump_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcCon
g_arch_instruction_unlock_operands(instr);
- if (!G_IS_IMM_OPERAND(op)) return;
-
- if (g_imm_operand_to_virt_t(G_IMM_OPERAND(op), &virt))
+ if (G_IS_IMM_OPERAND(op) && g_imm_operand_to_virt_t(G_IMM_OPERAND(op), &virt))
{
init_vmpa(&addr, VMPA_NO_PHYSICAL, virt);
@@ -77,6 +75,8 @@ void handle_jump_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcCon
}
+ g_object_unref(G_OBJECT(op));
+
}
@@ -131,6 +131,8 @@ void handle_branch_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcC
}
}
+ g_object_unref(G_OBJECT(op));
+
if (defined)
{
target = g_arch_processor_find_instr_by_address(proc, &addr);
@@ -191,9 +193,7 @@ void handle_call_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcCon
g_arch_instruction_unlock_operands(instr);
- if (!G_IS_IMM_OPERAND(op)) return;
-
- if (g_imm_operand_to_virt_t(G_IMM_OPERAND(op), &virt))
+ if (G_IS_IMM_OPERAND(op) && g_imm_operand_to_virt_t(G_IMM_OPERAND(op), &virt))
{
init_vmpa(&addr, VMPA_NO_PHYSICAL, virt);
@@ -207,4 +207,6 @@ void handle_call_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcCon
}
+ g_object_unref(G_OBJECT(op));
+
}