mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-04 06:00:28 +01:00
2007-07-18 Havoc Pennington <hp@redhat.com>
* dbus/dbus-message.c (dbus_message_get_cached) (dbus_message_cache_or_finalize): don't mess with message from message cache outside of the cache lock. Bug #9164 from Jonathan Matthew.
This commit is contained in:
parent
d012387afe
commit
8d939deebd
2 changed files with 11 additions and 4 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2007-07-18 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* dbus/dbus-message.c (dbus_message_get_cached)
|
||||
(dbus_message_cache_or_finalize): don't mess with message from
|
||||
message cache outside of the cache lock. Bug #9164 from Jonathan
|
||||
Matthew.
|
||||
|
||||
2007-07-13 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* Add indent-tabs-mode: nil to all file headers.
|
||||
|
|
|
|||
|
|
@ -482,10 +482,10 @@ dbus_message_get_cached (void)
|
|||
_dbus_assert (i < MAX_MESSAGE_CACHE_SIZE);
|
||||
_dbus_assert (message != NULL);
|
||||
|
||||
_DBUS_UNLOCK (message_cache);
|
||||
|
||||
_dbus_assert (message->refcount.value == 0);
|
||||
_dbus_assert (message->size_counters == NULL);
|
||||
|
||||
_DBUS_UNLOCK (message_cache);
|
||||
|
||||
return message;
|
||||
}
|
||||
|
|
@ -571,10 +571,10 @@ dbus_message_cache_or_finalize (DBusMessage *message)
|
|||
#endif
|
||||
|
||||
out:
|
||||
_DBUS_UNLOCK (message_cache);
|
||||
|
||||
_dbus_assert (message->refcount.value == 0);
|
||||
|
||||
_DBUS_UNLOCK (message_cache);
|
||||
|
||||
if (!was_cached)
|
||||
dbus_message_finalize (message);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue