tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit df1a8a657eadcc156032aa558ae0395cde878ee8
parent d21fa48cac0f41bd52306e269796559f75855323
Author: Kris Katterjohn <katterjohn@gmail.com>
Date:   Fri,  4 Jan 2019 13:48:08 -0600

Actually close the stdout pipe on error in process_unix_exec

When cleaning up after an error in process_unix_exec, the stdin
pipe was being double closed instead of closing both the stdin
and stdout pipes.  This occurred in two places.

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>

Diffstat:
Msrc/lib/process/process_unix.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/process/process_unix.c b/src/lib/process/process_unix.c @@ -183,8 +183,8 @@ process_unix_exec(process_t *process) close(stdin_pipe[1]); /** Cleanup standard out pipe. */ - close(stdin_pipe[0]); - close(stdin_pipe[1]); + close(stdout_pipe[0]); + close(stdout_pipe[1]); return PROCESS_STATUS_ERROR; } @@ -281,8 +281,8 @@ process_unix_exec(process_t *process) close(stdin_pipe[1]); /** Cleanup standard out pipe. */ - close(stdin_pipe[0]); - close(stdin_pipe[1]); + close(stdout_pipe[0]); + close(stdout_pipe[1]); /** Cleanup standard error pipe. */ close(stderr_pipe[0]);