Date: Wed, 25 May 2016 07:26:22 +0000 (UTC) From: Don Lewis <truckman@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300664 - head/lib/libcompat/4.3 Message-ID: <201605250726.u4P7QM5C024712@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: truckman Date: Wed May 25 07:26:22 2016 New Revision: 300664 URL: https://svnweb.freebsd.org/changeset/base/300664 Log: Fix Coverity CID 978183 Resource leak in rexec(). Close the socket if connect() fails to avoid leaking it. Reported by: Coverity CID: 978183 MFC after: 1 week Modified: head/lib/libcompat/4.3/rexec.c Modified: head/lib/libcompat/4.3/rexec.c ============================================================================== --- head/lib/libcompat/4.3/rexec.c Wed May 25 07:14:52 2016 (r300663) +++ head/lib/libcompat/4.3/rexec.c Wed May 25 07:26:22 2016 (r300664) @@ -330,6 +330,7 @@ retry: goto retry; } perror(hp->h_name); + (void) close(s); return (-1); } port = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605250726.u4P7QM5C024712>