mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 05:03:43 +01:00
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:
parent
d21fa48cac
commit
df1a8a657e
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user