aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-04-10 15:54:37 +0300
committerMarcel Holtmann <marcel@holtmann.org>2015-04-20 09:04:30 +0200
commit8bccfb8eb808e6f61c5d0b57341d63765382d462 (patch)
tree63082ecb562fd04b4a06cb7a7eea6fc86624a56b
parentf928b9f55bdcc66331b2bf9ef98116aef8b12e4b (diff)
downloadpacrunner-8bccfb8eb808e6f61c5d0b57341d63765382d462.tar.gz
gdbus: Close private connection if setup fails
Private connection should be properly closed with dbus_connection_close otherwise libdbus exits with the following error: 'The last reference on a connection was dropped without closing the connection. This is a bug in an application. See dbus_connection_unref() documentation for details. Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection.'
-rw-r--r--gdbus/mainloop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdbus/mainloop.c b/gdbus/mainloop.c
index 3e88eac..b90a844 100644
--- a/gdbus/mainloop.c
+++ b/gdbus/mainloop.c
@@ -322,6 +322,7 @@ DBusConnection *g_dbus_setup_private(DBusBusType type, const char *name,
return NULL;
if (setup_bus(conn, name, error) == FALSE) {
+ dbus_connection_close(conn);
dbus_connection_unref(conn);
return NULL;
}