Author: truckman Date: Wed Jun 1 17:41:00 2016 New Revision: 301152 URL: https://svnweb.freebsd.org/changeset/base/301152
Log: MFC r300664 Fix Coverity CID 978183 Resource leak in rexec(). Close the socket if connect() fails to avoid leaking it. Reported by: Coverity CID: 978183 Modified: stable/10/lib/libcompat/4.3/rexec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcompat/4.3/rexec.c ============================================================================== --- stable/10/lib/libcompat/4.3/rexec.c Wed Jun 1 17:39:03 2016 (r301151) +++ stable/10/lib/libcompat/4.3/rexec.c Wed Jun 1 17:41:00 2016 (r301152) @@ -330,6 +330,7 @@ retry: goto retry; } perror(hp->h_name); + (void) close(s); return (-1); } if (fd2p == 0) { _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"