[tracker] libtracker-miner: clear thumbnailer internal objects on init() failure
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: clear thumbnailer internal objects on init() failure
- Date: Mon, 24 Feb 2014 10:07:49 +0000 (UTC)
commit d67ace9655f87fc659c4f7a0d5eca3f3567dd3eb
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Feb 24 11:06:19 2014 +0100
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
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 51a07db..58fc76a 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]