mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-23 21:37:42 -04:00
support: make sure loop_add_io is closes the fd when asked
When the close argument is true, loop_add_io is supposed to close the fd even when an error occurs. This makes it possible to have spa_steal_fd() work even in the case of errors.
This commit is contained in:
parent
398f74571b
commit
a9f62579ba
1 changed files with 2 additions and 0 deletions
|
|
@ -922,6 +922,8 @@ error_exit_free:
|
||||||
free(source);
|
free(source);
|
||||||
errno = -res;
|
errno = -res;
|
||||||
error_exit:
|
error_exit:
|
||||||
|
if (close)
|
||||||
|
spa_system_close(impl->system, fd);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue