sap-dummy: Fix DBus connection leak if interface registration failed

If DBus interface registration failed dbus connection should be
unreferenced.
This commit is contained in:
Szymon Janc 2012-05-25 16:21:01 +02:00 committed by Johan Hedberg
parent b7bc38497e
commit 77713a7a4b

View File

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