mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-09 03:01:53 -04:00
modules: loop_add_io with close=true owns the fd
We should not close the fd when loop_add_io with close=true fails because the fd is already closed.
This commit is contained in:
parent
eec372ba9d
commit
8907d0860b
6 changed files with 9 additions and 20 deletions
|
|
@ -902,7 +902,6 @@ int stream_activate(struct stream *stream, uint16_t index, uint64_t now)
|
|||
if (stream->source == NULL) {
|
||||
res = -errno;
|
||||
pw_log_error("stream %p: can't create source: %m", stream);
|
||||
close(fd);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
@ -1017,10 +1016,8 @@ int stream_activate_virtual(struct stream *stream, uint16_t index)
|
|||
|
||||
stream->source = pw_loop_add_io(server->impl->loop, fd,
|
||||
SPA_IO_IN, true, on_socket_data, stream);
|
||||
if (stream->source == NULL) {
|
||||
close(fd);
|
||||
if (stream->source == NULL)
|
||||
return -errno;
|
||||
}
|
||||
}
|
||||
pw_stream_set_active(stream->stream, true);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue