svn commit: r271844 - stable/10/contrib/openbsm/bin/auditdistd

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Sep 18 22:17:47 UTC 2014


Author: pjd
Date: Thu Sep 18 22:17:46 2014
New Revision: 271844
URL: http://svnweb.freebsd.org/changeset/base/271844

Log:
  MFC r271577:
  
  Fix descriptors leak.
  
  PR:		bin/191002
  Reported by:	Ryan Steinmetz
  Submitted by:	mjg
  Approved by:	re (gjb)

Modified:
  stable/10/contrib/openbsm/bin/auditdistd/subr.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/openbsm/bin/auditdistd/subr.c
==============================================================================
--- stable/10/contrib/openbsm/bin/auditdistd/subr.c	Thu Sep 18 22:16:20 2014	(r271843)
+++ stable/10/contrib/openbsm/bin/auditdistd/subr.c	Thu Sep 18 22:17:46 2014	(r271844)
@@ -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