[gvfs] metadata: Free objects on error
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] metadata: Free objects on error
- Date: Sat, 31 Jan 2015 10:24:42 +0000 (UTC)
commit 2107ad1e8bf2dbd5d3a364baee37a748acd4eb3f
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Sat Jan 31 10:13:28 2015 +0000
metadata: Free objects on error
https://bugzilla.gnome.org/show_bug.cgi?id=743653
metadata/meta-daemon.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/metadata/meta-daemon.c b/metadata/meta-daemon.c
index 9572940..a7b86be 100644
--- a/metadata/meta-daemon.c
+++ b/metadata/meta-daemon.c
@@ -500,8 +500,6 @@ main (int argc, char *argv[])
return 0;
}
- loop = g_main_loop_new (NULL, FALSE);
-
error = NULL;
conn = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
if (!conn)
@@ -517,6 +515,7 @@ main (int argc, char *argv[])
NULL,
(GDestroyNotify)tree_info_free);
+ loop = g_main_loop_new (NULL, FALSE);
g_dbus_connection_set_exit_on_close (conn, FALSE);
g_signal_connect (conn, "closed", G_CALLBACK (on_connection_closed), loop);
@@ -539,6 +538,8 @@ main (int argc, char *argv[])
g_printerr ("Error exporting metadata daemon: %s (%s, %d)\n",
error->message, g_quark_to_string (error->domain), error->code);
g_error_free (error);
+ g_object_unref (conn);
+ g_main_loop_unref (loop);
return 1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]