diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-08-08 23:05:12 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-08-08 23:05:12 (GMT) |
commit | de379f531ad5fa356b33287196f884550abd2af4 (patch) | |
tree | df15fee4e06c5424de4b01f42baec3005e081091 /src/analysis/disass/routines.c | |
parent | 89d41f2629b9d98069fa7c1db70821a14da57523 (diff) |
Updated some object destruction processes.
Diffstat (limited to 'src/analysis/disass/routines.c')
-rw-r--r-- | src/analysis/disass/routines.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/analysis/disass/routines.c b/src/analysis/disass/routines.c index 4e65b77..c57b80c 100644 --- a/src/analysis/disass/routines.c +++ b/src/analysis/disass/routines.c @@ -150,14 +150,16 @@ static void g_routines_study_init(GRoutinesStudy *study) static void g_routines_study_dispose(GRoutinesStudy *study) { - g_object_unref(G_OBJECT(study->portions)); + g_clear_object(&study->binary); - g_binary_format_unlock_symbols_rd(study->format); + g_clear_object(&study->proc); - g_object_unref(G_OBJECT(study->format)); - g_object_unref(G_OBJECT(study->proc)); + if (study->format != NULL) + g_binary_format_unlock_symbols_rd(study->format); - g_object_unref(G_OBJECT(study->binary)); + g_clear_object(&study->format); + + g_clear_object(&study->portions); G_OBJECT_CLASS(g_routines_study_parent_class)->dispose(G_OBJECT(study)); |