mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
bluetooth: fix invalid memory access
When an GetProperties() reply arrives after we already deleted the device structure for it make sure we don't accidentaly touch the invalidated object. https://bugzilla.redhat.com/show_bug.cgi?id=543205
This commit is contained in:
parent
73ae1fce00
commit
4bcb1a909f
1 changed files with 7 additions and 1 deletions
|
|
@ -342,7 +342,13 @@ static void get_properties_reply(DBusPendingCall *pending, void *userdata) {
|
|||
/* dbus_message_get_interface(p->message), */
|
||||
/* dbus_message_get_path(p->message)); */
|
||||
|
||||
d = p->call_data;
|
||||
/* We don't use p->call_data here right-away since the device
|
||||
* might already be invalidated at this point */
|
||||
|
||||
if (!(d = pa_hashmap_get(y->devices, dbus_message_get_path(p->message))))
|
||||
return;
|
||||
|
||||
pa_assert(p->call_data == d);
|
||||
|
||||
valid = dbus_message_get_type(r) == DBUS_MESSAGE_TYPE_ERROR ? -1 : 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue