diff --git a/spa/plugins/alsa/alsa-seq.c b/spa/plugins/alsa/alsa-seq.c index 9c693e08d..bcbddc992 100644 --- a/spa/plugins/alsa/alsa-seq.c +++ b/spa/plugins/alsa/alsa-seq.c @@ -177,7 +177,6 @@ static int uninit_stream(struct seq_state *state, enum spa_direction direction) { struct seq_stream *stream = &state->streams[direction]; spa_list_insert_list(&state->free_list, &stream->port_list); - spa_list_insert_list(&state->free_list, &stream->mix_list); if (stream->codec) snd_midi_event_free(stream->codec); stream->codec = NULL; diff --git a/spa/plugins/audiomixer/audiomixer.c b/spa/plugins/audiomixer/audiomixer.c index ff71f1442..80d4bac02 100644 --- a/spa/plugins/audiomixer/audiomixer.c +++ b/spa/plugins/audiomixer/audiomixer.c @@ -926,11 +926,11 @@ static int impl_clear(struct spa_handle *handle) this = (struct impl *) handle; spa_list_insert_list(&this->free_list, &this->port_list); - spa_list_insert_list(&this->free_list, &this->mix_list); spa_list_consume(port, &this->free_list, link) { spa_list_remove(&port->link); free(port); } + spa_list_init(&this->mix_list); mix_ops_free(&this->ops); return 0; } diff --git a/spa/plugins/audiomixer/mixer-dsp.c b/spa/plugins/audiomixer/mixer-dsp.c index a65268fb1..50b582d1d 100644 --- a/spa/plugins/audiomixer/mixer-dsp.c +++ b/spa/plugins/audiomixer/mixer-dsp.c @@ -863,10 +863,7 @@ static int impl_clear(struct spa_handle *handle) this = (struct impl *) handle; - spa_list_consume(port, &this->port_list, link) { - spa_list_remove(&port->link); - free(port); - } + spa_list_insert_list(&this->free_list, &this->port_list); spa_list_consume(port, &this->free_list, link) { spa_list_remove(&port->link); free(port); diff --git a/spa/plugins/control/mixer.c b/spa/plugins/control/mixer.c index b3d3252df..ccf0df54a 100644 --- a/spa/plugins/control/mixer.c +++ b/spa/plugins/control/mixer.c @@ -909,7 +909,6 @@ static int impl_clear(struct spa_handle *handle) this = (struct impl *) handle; spa_list_insert_list(&this->free_list, &this->port_list); - spa_list_insert_list(&this->free_list, &this->mix_list); spa_list_consume(port, &this->free_list, link) { spa_list_remove(&port->link); free(port);