Fix descriptors leak.

PR:		bin/191002
Reported by:	Ryan Steinmetz
Submitted by:	mjg
This commit is contained in:
pjd 2014-09-14 09:26:33 +00:00
parent db159e8ff5
commit 4a0b0e233c

View File

@ -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");