diff options
author | pjd <pjd@FreeBSD.org> | 2014-09-14 09:26:33 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2014-09-14 09:26:33 +0000 |
commit | 4a0b0e233c26fc824e0e91281e54b1772f518204 (patch) | |
tree | 6ae9d96381f1b73fb398900ff4ef62b576d7ccc7 /contrib/openbsm | |
parent | db159e8ff59adf45361c46ffe33541ce4da5cd31 (diff) | |
download | FreeBSD-src-4a0b0e233c26fc824e0e91281e54b1772f518204.zip FreeBSD-src-4a0b0e233c26fc824e0e91281e54b1772f518204.tar.gz |
Fix descriptors leak.
PR: bin/191002
Reported by: Ryan Steinmetz
Submitted by: mjg
Diffstat (limited to 'contrib/openbsm')
-rw-r--r-- | contrib/openbsm/bin/auditdistd/subr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/openbsm/bin/auditdistd/subr.c b/contrib/openbsm/bin/auditdistd/subr.c index e98ed1e..0f531cc 100644 --- a/contrib/openbsm/bin/auditdistd/subr.c +++ b/contrib/openbsm/bin/auditdistd/subr.c @@ -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"); |