mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Close fds on pipe() error in tor_spawn_background().
This commit is contained in:
committed by
Nick Mathewson
parent
9f88c1e14f
commit
aae570b493
@@ -0,0 +1,3 @@
|
||||
o Minor bugfixes:
|
||||
- On a failed pipe() call, don't leak fds. Fix for bug 4296; bugfix
|
||||
on 0.2.3.1-alpha.
|
||||
@@ -3470,6 +3470,10 @@ tor_spawn_background(const char *const filename, const char **argv,
|
||||
log_warn(LD_GENERAL,
|
||||
"Failed to set up pipe for stderr communication with child process: %s",
|
||||
strerror(errno));
|
||||
|
||||
close(stdout_pipe[0]);
|
||||
close(stdout_pipe[1]);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user