svn commit: r271577 - head/contrib/openbsm/bin/auditdistd
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sun Sep 14 09:26:34 UTC 2014
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");
More information about the svn-src-all
mailing list