diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2014-02-24 11:06:19 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2014-02-24 11:08:31 +0100 |
commit | d67ace9655f87fc659c4f7a0d5eca3f3567dd3eb (patch) | |
tree | a080bfb55f6e1375b9c99f1635d758a7ae16027a | |
parent | de2db11ab825ad2c91f5ab44374868d899abd1a4 (diff) | |
download | tracker-d67ace9655f87fc659c4f7a0d5eca3f3567dd3eb.tar.gz |
libtracker-miner: clear thumbnailer internal objects on init() failure
So we don't try to free invalid pointers again on finalize()
https://bugzilla.gnome.org/show_bug.cgi?id=724984
-rw-r--r-- | src/libtracker-miner/tracker-thumbnailer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libtracker-miner/tracker-thumbnailer.c b/src/libtracker-miner/tracker-thumbnailer.c index 51a07db5e..58fc76ae8 100644 --- a/src/libtracker-miner/tracker-thumbnailer.c +++ b/src/libtracker-miner/tracker-thumbnailer.c @@ -158,7 +158,7 @@ tracker_thumbnailer_initable_init (GInitable *initable, NULL, error); if (!private->cache_proxy) { - g_object_unref (private->connection); + g_clear_object (&private->connection); return FALSE; } @@ -172,8 +172,8 @@ tracker_thumbnailer_initable_init (GInitable *initable, error); if (!private->manager_proxy) { - g_object_unref (private->connection); - g_object_unref (private->cache_proxy); + g_clear_object (&private->connection); + g_clear_object (&private->cache_proxy); return FALSE; } @@ -186,9 +186,9 @@ tracker_thumbnailer_initable_init (GInitable *initable, error); if (!v) { - g_object_unref (private->connection); - g_object_unref (private->cache_proxy); - g_object_unref (private->manager_proxy); + g_clear_object (&private->connection); + g_clear_object (&private->cache_proxy); + g_clear_object (&private->manager_proxy); return FALSE; } else { GStrv mime_types = NULL; |