audiommixer: only clear mix_ops when initialized

It's possible that the mix_ops was not initialized and then the free
pointer is NULL, so check this instead of segfaulting.
This commit is contained in:
Wim Taymans 2025-09-01 12:39:08 +02:00
parent 4796b3fb95
commit 0310bb5c5c

View file

@ -931,7 +931,8 @@ static int impl_clear(struct spa_handle *handle)
free(port);
}
spa_list_init(&this->mix_list);
mix_ops_free(&this->ops);
if (this->ops.free)
mix_ops_free(&this->ops);
return 0;
}