summaryrefslogtreecommitdiff
path: root/src/analysis/binary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/binary.c')
-rw-r--r--src/analysis/binary.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index ecf9c79..61f826a 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -146,18 +146,14 @@ static void g_loaded_binary_init(GLoadedBinary *binary)
static void g_loaded_binary_dispose(GLoadedBinary *binary)
{
- gpointer obj_class; /* Classe parente */
-
- g_object_unref(G_OBJECT(binary->format));
- g_object_unref(G_OBJECT(binary->proc));
+ if (binary->format != NULL)
+ g_object_unref(G_OBJECT(binary->format));
+ if (binary->proc != NULL)
+ g_object_unref(G_OBJECT(binary->proc));
/* TODO... */
- /* On passe le relai */
-
- obj_class = g_type_class_peek_parent(G_FILE_BINARY_GET_CLASS(binary));
-
- G_OBJECT_CLASS(obj_class)->dispose(G_OBJECT(binary));
+ G_OBJECT_CLASS(g_loaded_binary_parent_class)->dispose(G_OBJECT(binary));
}
@@ -176,15 +172,9 @@ static void g_loaded_binary_dispose(GLoadedBinary *binary)
static void g_loaded_binary_finalize(GLoadedBinary *binary)
{
- gpointer obj_class; /* Classe parente */
-
/* TODO */
- /* On passe le relai */
-
- obj_class = g_type_class_peek_parent(G_FILE_BINARY_GET_CLASS(binary));
-
- G_OBJECT_CLASS(obj_class)->finalize(G_OBJECT(binary));
+ G_OBJECT_CLASS(g_loaded_binary_parent_class)->finalize(G_OBJECT(binary));
}