From df1a8a657eadcc156032aa558ae0395cde878ee8 Mon Sep 17 00:00:00 2001 From: Kris Katterjohn Date: Fri, 4 Jan 2019 13:48:08 -0600 Subject: 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 --- src/lib/process/process_unix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/process/process_unix.c') diff --git a/src/lib/process/process_unix.c b/src/lib/process/process_unix.c index 57ca69a768..dd4ccbf603 100644 --- 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]); -- cgit v1.2.3-54-g00ecf