From 00727a310c6cbd849dd47bd6de83f60880451c8a Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 7 May 2016 04:47:12 -0600 Subject: [PATCH] Ignore the result of send() on exec error, if it fails the other end of the pipe is gone and we are headed for exit. Coverity CID 104066. --- src/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exec.c b/src/exec.c index c0128512d..0a6f7471c 100644 --- a/src/exec.c +++ b/src/exec.c @@ -133,7 +133,7 @@ fork_cmnd(struct command_details *details, int sv[2]) close(signal_pipe[1]); (void)fcntl(sv[1], F_SETFD, FD_CLOEXEC); exec_cmnd(details, &cstat, sv[1]); - send(sv[1], &cstat, sizeof(cstat), 0); + ignore_result(send(sv[1], &cstat, sizeof(cstat), 0)); sudo_debug_exit_int(__func__, __FILE__, __LINE__, sudo_debug_subsys, 1); _exit(1); } -- 2.40.0