From: Todd C. Miller Date: Sat, 7 May 2016 10:47:12 +0000 (-0600) Subject: Ignore the result of send() on exec error, if it fails the other X-Git-Tag: SUDO_1_8_17^2~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00727a310c6cbd849dd47bd6de83f60880451c8a;p=sudo 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. --- 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); }