]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Prevent a crash in some applications due to timers leaking after the
authorThiago Macieira <thiago@kde.org>
Sat, 17 May 2008 08:09:20 +0000 (10:09 +0200)
committerThiago Macieira <thiago@kde.org>
Sat, 17 May 2008 08:10:42 +0000 (10:10 +0200)
DVusPendingCall object was freed.

    * dbus-connection.c: Remove the timer for the pending call's timeout in
      case the reply has timed out in blocking code. This fixes bug 15684.

dbus/dbus-connection.c

index 3a1670ca1d197c74b1322fd45c3945775ca0fa2e..7b13b2498233a15edfd4ffcb7c07db5b51291ec9 100644 (file)
@@ -965,6 +965,13 @@ _dbus_connection_detach_pending_call_and_unlock (DBusConnection  *connection,
   _dbus_pending_call_ref_unlocked (pending);
   _dbus_hash_table_remove_int (connection->pending_replies,
                                _dbus_pending_call_get_reply_serial_unlocked (pending));
+
+  if (_dbus_pending_call_is_timeout_added_unlocked (pending))
+      _dbus_connection_remove_timeout_unlocked (connection,
+              _dbus_pending_call_get_timeout_unlocked (pending));
+
+  _dbus_pending_call_set_timeout_added_unlocked (pending, FALSE);
+
   _dbus_pending_call_unref_and_unlock (pending);
 }