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>
This commit is contained in:
Kris Katterjohn 2019-01-04 13:48:08 -06:00 committed by Nick Mathewson
parent d21fa48cac
commit df1a8a657e

View File

@ -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]);