pulse-server: check reference count of sample when freeing it

When the pulse server context is being freed, only a single reference
should be alive to each sample because the pending samples
are all destroyed beforehand.
This commit is contained in:
Barnabás Pőcze 2022-01-30 18:55:54 +01:00 committed by Wim Taymans
parent f181210b29
commit e63dee6075

View file

@ -5070,7 +5070,10 @@ const struct command commands[COMMAND_MAX] =
static int impl_free_sample(void *item, void *data)
{
struct sample *s = item;
sample_free(s);
spa_assert(s->ref == 1);
sample_unref(s);
return 0;
}