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 52852f66cb
commit 0da4afca76

View file

@ -921,7 +921,8 @@ static int impl_clear(struct spa_handle *handle)
for (i = 0; i < MAX_PORTS; i++)
free(this->in_ports[i]);
mix_ops_free(&this->ops);
if (this->ops.free)
mix_ops_free(&this->ops);
return 0;
}