PERFORCE change 1200237 for review
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sun Sep 14 09:45:19 UTC 2014
http://p4web.freebsd.org/@@1200237?ac=10
Change 1200237 by pjd at pjd_anger on 2014/09/14 09:45:07
Fix descriptors leak.
PR: bin/191002
Reported by: Ryan Steinmetz
Submitted by: mjg
Affected files ...
.. //depot/projects/trustedbsd/openbsm/bin/auditdistd/subr.c#4 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/bin/auditdistd/subr.c#4 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditdistd/subr.c#3 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditdistd/subr.c#4 $
*/
#include <config/config.h>
@@ -228,6 +228,11 @@
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 p4-projects
mailing list