pulse-server: don't use the pending_sample after free

Destroying the sample_play will free the user_data, which is the
pending_sample info. So don't try to use the pending_sample anymore
after destroy.
This commit is contained in:
Wim Taymans 2021-02-24 12:55:34 +01:00
parent e340a44a35
commit 72acd752f6

View file

@ -2665,8 +2665,8 @@ static void pending_sample_free(struct pending_sample *ps)
{ {
spa_list_remove(&ps->link); spa_list_remove(&ps->link);
spa_hook_remove(&ps->listener); spa_hook_remove(&ps->listener);
sample_play_destroy(ps->play);
ps->client->ref--; ps->client->ref--;
sample_play_destroy(ps->play);
} }
static void sample_play_ready(void *data, uint32_t index) static void sample_play_ready(void *data, uint32_t index)