bluez5: destroy update_delay_event on transport_start failure

transport_start() creates update_delay_event before ensuring SCO I/O.
When spa_bt_transport_ensure_sco_io() fails, the fail path only cleans
up codec_data and leaks the event source on the loop.

Destroy update_delay_event in fail, matching do_remove_source().
This commit is contained in:
zuozhiwei 2026-07-07 16:04:04 +08:00 committed by Wim Taymans
parent 062f19b214
commit 776117164f

View file

@ -1685,6 +1685,10 @@ static int transport_start(struct impl *this)
return 0;
fail:
if (this->update_delay_event) {
spa_loop_utils_destroy_source(this->loop_utils, this->update_delay_event);
this->update_delay_event = NULL;
}
if (this->codec_data) {
if (this->own_codec_data)
this->codec->deinit(this->codec_data);