diff options
author | George Kadianakis <desnacked@gmail.com> | 2011-10-24 16:34:10 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-03-12 12:41:29 -0400 |
commit | aae570b4932da15d723b6e7b99038a950fc8a7ad (patch) | |
tree | ef40a4dd2560327d4f152a54ca975aece348130f /src | |
parent | 9f88c1e14f22104992904d99b5c857838acd6cfb (diff) | |
download | tor-aae570b4932da15d723b6e7b99038a950fc8a7ad.tar tor-aae570b4932da15d723b6e7b99038a950fc8a7ad.tar.gz |
Close fds on pipe() error in tor_spawn_background().
Diffstat (limited to 'src')
-rw-r--r-- | src/common/util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 3950fc169..1807ee7ad 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -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; } |