]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix error coverity detected in fr_exec_fork_wait() (CID #1503999) (#4665)
authorJames Jones <jejones3141@gmail.com>
Thu, 11 Aug 2022 10:31:06 +0000 (05:31 -0500)
committerGitHub <noreply@github.com>
Thu, 11 Aug 2022 10:31:06 +0000 (18:31 +0800)
stdin_fd's state shouldn't influence stdout_pipe.

src/lib/server/exec.c

index 5f7860f29937d18e57035a24e3baa8edeff9743e..3bc14f5ba0caa1280761c70c8c401ba19c880a3d 100644 (file)
@@ -590,7 +590,7 @@ int fr_exec_fork_wait(pid_t *pid_p, int *stdin_fd, int *stdout_fd, int *stderr_f
 
        if (stdin_fd) {
                *stdin_fd = stdin_pipe[1];
-               close(stdout_pipe[0]);
+               close(stdin_pipe[0]);
        }
 
        if (stdout_fd) {