dbus_bus_get increments reference count of a DBusConnection.
It is callers responsibility to all dbus_connection_unref after use.
g_warning ("Error retrieving accessibility bus address: %s: %s",
error.name, error.message);
dbus_error_free (&error);
- return NULL;
+ goto out;
}
{
DBUS_TYPE_INVALID))
{
dbus_message_unref (reply);
- return NULL;
+ goto out;
}
address = g_strdup (tmp_address);
dbus_message_unref (reply);
}
+out:
+ dbus_connection_unref (session_bus);
return address;
}