Date: Sun, 14 Sep 2014 09:26:34 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271577 - head/contrib/openbsm/bin/auditdistd Message-ID: <201409140926.s8E9QYgQ096505@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Sun Sep 14 09:26:33 2014 New Revision: 271577 URL: http://svnweb.freebsd.org/changeset/base/271577 Log: Fix descriptors leak. PR: bin/191002 Reported by: Ryan Steinmetz Submitted by: mjg Modified: head/contrib/openbsm/bin/auditdistd/subr.c Modified: head/contrib/openbsm/bin/auditdistd/subr.c ============================================================================== --- head/contrib/openbsm/bin/auditdistd/subr.c Sun Sep 14 09:20:01 2014 (r271576) +++ head/contrib/openbsm/bin/auditdistd/subr.c Sun Sep 14 09:26:33 2014 (r271577) @@ -228,6 +228,11 @@ wait_for_file_init(int fd) 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?201409140926.s8E9QYgQ096505>