dbus_message_lock (sub_message);
- if (kdbus_write_msg_internal (transport, sub_message, name, NULL, FALSE) == -1)
+ ret = kdbus_write_msg_internal (transport, sub_message, name, NULL, FALSE);
+
+ dbus_message_unref (sub_message);
+
+ if (ret == -1)
return NULL;
else
{
* error messages are inserted directly to incoming queue and
* application hangs on dbus_poll.
*
- * This causes a busy loop in _dbus_connection_block_pending_call()
+ * This causes a busy loop in _dbus_connection_block_pending_call()
* There is no case of waiting for the locally-generated error reply
if (_dbus_connection_get_n_incoming (transport->connection) > 0)