[PATCH 09/10] sap-dummy: Fix DBus connection leak if interface registration failed

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

 



If DBus interface registration failed dbus connection should be
unreferenced.
---
 sap/sap-dummy.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/sap/sap-dummy.c b/sap/sap-dummy.c
index fd185c9..7ea4e92 100644
--- a/sap/sap-dummy.c
+++ b/sap/sap-dummy.c
@@ -342,6 +342,8 @@ int sap_init(void)
 				NULL, NULL) == FALSE) {
 		error("sap-dummy interface %s init failed on path %s",
 					SAP_DUMMY_IFACE, SAP_DUMMY_PATH);
+		dbus_connection_unref(connection);
+		connection = NULL;
 		return -1;
 	}
 
-- 
on behalf of ST-Ericsson

--
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