diff options
author | pjd <pjd@FreeBSD.org> | 2014-09-18 22:17:46 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2014-09-18 22:17:46 +0000 |
commit | 39cf32414dc4bda882e6088de8d037ca9254e20d (patch) | |
tree | 46f13776c5188ad7191ec5b851f1221831aa4fda | |
parent | 3a41a0b0c175e61c5c5cd04fb461ce53b57e1ac7 (diff) | |
download | FreeBSD-src-39cf32414dc4bda882e6088de8d037ca9254e20d.zip FreeBSD-src-39cf32414dc4bda882e6088de8d037ca9254e20d.tar.gz |
MFC r271577:
Fix descriptors leak.
PR: bin/191002
Reported by: Ryan Steinmetz
Submitted by: mjg
Approved by: re (gjb)
-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"); |