From 39a84a70b1874a56aeda1f54573a63f7d93a720e Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 23 Nov 2014 00:13:54 +0100 Subject: daemon: fix dbus proxy leak on shutdown Fixes leaking some DBus objects on shutdown, causing noise in gobject-list and valgrind logs. https://bugs.freedesktop.org/show_bug.cgi?id=82659 --- src/up-main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/up-main.c b/src/up-main.c index cb835b7..25f16d3 100644 --- a/src/up-main.c +++ b/src/up-main.c @@ -158,7 +158,7 @@ main (gint argc, gchar **argv) UpKbdBacklight *kbd_backlight = NULL; UpWakeups *wakeups = NULL; GOptionContext *context; - DBusGProxy *bus_proxy; + DBusGProxy *bus_proxy = NULL; DBusGConnection *bus; gboolean ret; gint retval = 1; @@ -289,6 +289,8 @@ out: g_object_unref (daemon); if (loop != NULL) g_main_loop_unref (loop); + if (bus_proxy != NULL) + g_object_unref (bus_proxy); return retval; } -- cgit v1.2.1