mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-20 21:37:47 -04:00
bluez5: fix cleanup
Clean up the transport listener and the codec_props on error. Also clean up when the timerfd allocation fails.
This commit is contained in:
parent
7254b8288f
commit
3e53487c72
2 changed files with 16 additions and 5 deletions
|
|
@ -2674,7 +2674,7 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
|
||||
if ((res = spa_system_timerfd_create(this->data_system,
|
||||
CLOCK_MONOTONIC, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK)) < 0)
|
||||
return res;
|
||||
goto error_remove_listener;
|
||||
this->timerfd = res;
|
||||
|
||||
if ((res = spa_system_timerfd_create(this->data_system,
|
||||
|
|
@ -2702,6 +2702,10 @@ error_close_flush_timerfd:
|
|||
spa_system_close(this->data_system, this->flush_timerfd);
|
||||
error_close_timerfd:
|
||||
spa_system_close(this->data_system, this->timerfd);
|
||||
error_remove_listener:
|
||||
spa_hook_remove(&this->transport_listener);
|
||||
if (this->codec_props && this->codec->clear_props)
|
||||
this->codec->clear_props(this->codec_props);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue