summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-11-23 00:13:54 +0100
committerPeter Wu <peter@lekensteyn.nl>2014-11-26 11:40:49 +0100
commit39a84a70b1874a56aeda1f54573a63f7d93a720e (patch)
treef1289bbda96e57fd52b812a8faf6a2170daa6f17
parent059e3e09393c3aae5b31ec8edec9575460e6aaf5 (diff)
downloadupower-daemon-free-all.tar.gz
daemon: fix dbus proxy leak on shutdowndaemon-free-all
Fixes leaking some DBus objects on shutdown, causing noise in gobject-list and valgrind logs. https://bugs.freedesktop.org/show_bug.cgi?id=82659
-rw-r--r--src/up-main.c4
1 files changed, 3 insertions, 1 deletions
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;
}