[PATCH BlueZ 3/4] gdbus: Fix not calling dbus_connection_close for private connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

dbus_bus_get_private documentation says:

  "Unlike dbus_bus_get(), always creates a new connection. This
  connection will not be saved or recycled by libdbus. Caller owns a
  reference to the bus and must either close it or know it to be closed
  prior to releasing this reference."
---
 gdbus/mainloop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdbus/mainloop.c b/gdbus/mainloop.c
index 49e6538..4771f20 100644
--- a/gdbus/mainloop.c
+++ b/gdbus/mainloop.c
@@ -328,6 +328,7 @@ DBusConnection *g_dbus_setup_private(DBusBusType type, const char *name,
 	if (g_dbus_connect(conn, name, error))
 		return conn;
 
+	dbus_connection_close(conn);
 	dbus_connection_unref(conn);
 	return NULL;
 }
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux