diff --git a/obexd/client/session.c b/obexd/client/session.c
index a84b74e..36475d6 100644
--- a/obexd/client/session.c
+++ b/obexd/client/session.c
va_end(args);
+ if (!cb) {
+ g_dbus_send_message(connection, msg);
+ return 0;
+ }
+
if (!dbus_connection_send_with_reply(connection, msg, &call, -1)) {
error("Sending %s failed", method);
dbus_message_unref(msg);
if (ret == FALSE)
return;
+ send_method_call(session->conn_system,
+ BT_BUS_NAME, session->adapter,
+ BT_ADAPTER_IFACE, "ReleaseSession",
+ NULL, NULL,
+ DBUS_TYPE_INVALID);
session_free(session);
}