From 0310bb5c5c43933c6c02ad6ed57c527e8cc7ed81 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 1 Sep 2025 12:39:08 +0200 Subject: [PATCH] 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. --- spa/plugins/audiomixer/audiomixer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spa/plugins/audiomixer/audiomixer.c b/spa/plugins/audiomixer/audiomixer.c index 80d4bac02..4e9333dca 100644 --- a/spa/plugins/audiomixer/audiomixer.c +++ b/spa/plugins/audiomixer/audiomixer.c @@ -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; }