mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
dbus: Make sure that subscription callbacks don't try to access removed objects.
This commit is contained in:
parent
3e0e685a8c
commit
edf80104e3
4 changed files with 143 additions and 72 deletions
|
|
@ -463,7 +463,9 @@ static void subscription_cb(pa_core *c, pa_subscription_event_type_t t, uint32_t
|
|||
pa_assert(c);
|
||||
pa_assert(s);
|
||||
|
||||
if (idx != s->sample->index)
|
||||
/* We can't use idx != s->sample->index, because the s->sample pointer may
|
||||
* be stale at this point. */
|
||||
if (pa_idxset_get_by_index(c->scache, idx) != s->sample)
|
||||
return;
|
||||
|
||||
if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) != PA_SUBSCRIPTION_EVENT_CHANGE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue