summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/binaries/file.c8
-rw-r--r--src/analysis/binary.c22
2 files changed, 7 insertions, 23 deletions
diff --git a/src/analysis/binaries/file.c b/src/analysis/binaries/file.c
index 46307fb..9c43ed5 100644
--- a/src/analysis/binaries/file.c
+++ b/src/analysis/binaries/file.c
@@ -133,15 +133,9 @@ static void g_file_binary_init(GFileBinary *binary)
static void g_file_binary_finalize(GFileBinary *binary)
{
- gpointer obj_class; /* Classe parente */
-
free(binary->filename);
- /* 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_file_binary_parent_class)->finalize(G_OBJECT(binary));
}
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));
}