Date: Sun, 14 Sep 2014 09:45:18 GMT From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 1200237 for review Message-ID: <201409140945.s8E9jIsA047114@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@1200237?ac=10 Change 1200237 by pjd@pjd_anger on 2014/09/14 09:45:07 Fix descriptors leak. PR: bin/191002 Reported by: Ryan Steinmetz Submitted by: mjg Affected files ... .. //depot/projects/trustedbsd/openbsm/bin/auditdistd/subr.c#4 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/bin/auditdistd/subr.c#4 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/auditdistd/subr.c#3 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditdistd/subr.c#4 $ */ #include <config/config.h> @@ -228,6 +228,11 @@ PJDLOG_ASSERT(fd != -1); #ifdef HAVE_KQUEUE + if (wait_for_file_kq != -1) { + close(wait_for_file_kq); + wait_for_file_kq = -1; + } + kq = kqueue(); if (kq == -1) { pjdlog_errno(LOG_WARNING, "kqueue() failed");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409140945.s8E9jIsA047114>