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
This commit is contained in:
Don Lewis 2016-06-01 17:41:00 +00:00
parent afaff5e72c
commit 15fe2c59b0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=301152

View File

@ -330,6 +330,7 @@ retry:
goto retry; goto retry;
} }
perror(hp->h_name); perror(hp->h_name);
(void) close(s);
return (-1); return (-1);
} }
if (fd2p == 0) { if (fd2p == 0) {