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;
 }
 
-- 
2.1.3

_______________________________________________
devkit-devel mailing list
devkit-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/devkit-devel

Reply via email to