summaryrefslogtreecommitdiff
path: root/src/arch/target.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/target.c')
-rw-r--r--src/arch/target.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/arch/target.c b/src/arch/target.c
index 64b12dd..d3bd89a 100644
--- a/src/arch/target.c
+++ b/src/arch/target.c
@@ -51,6 +51,7 @@ struct _GTargetOperand
vmpa2t addr; /* Adresse de l'élément visé */
bool strict; /* Résolution stricte */
+ /* Référence circulaire */
GBinSymbol *symbol; /* Eventuel symbole associé */
phys_t diff; /* Position dans le symbole */
@@ -206,9 +207,6 @@ static void g_target_operand_targetable_interface_init(GTargetableOperandInterfa
static void g_target_operand_dispose(GTargetOperand *operand)
{
- if (operand->symbol != NULL)
- g_object_unref(G_OBJECT(operand->symbol));
-
G_OBJECT_CLASS(g_target_operand_parent_class)->dispose(G_OBJECT(operand));
}
@@ -505,9 +503,6 @@ bool g_target_operand_resolve(GTargetOperand *operand, GBinFormat *format, bool
const mrange_t *range; /* Couverture du symbole */
#endif
- if (operand->symbol != NULL)
- g_object_unref(G_OBJECT(operand->symbol));
-
operand->strict = strict;
result = g_binary_format_resolve_symbol(format, &operand->addr, strict, &operand->symbol, &operand->diff);
@@ -553,6 +548,10 @@ bool g_target_operand_resolve(GTargetOperand *operand, GBinFormat *format, bool
}
+ /* Référence circulaire */
+ if (operand->symbol != NULL)
+ g_object_unref(operand->symbol);
+
return result;
}