From owner-svn-src-stable-10@FreeBSD.ORG Thu Sep 18 22:17:47 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 821062DC; Thu, 18 Sep 2014 22:17:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C734CEC; Thu, 18 Sep 2014 22:17:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8IMHl7H098905; Thu, 18 Sep 2014 22:17:47 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8IMHloQ098904; Thu, 18 Sep 2014 22:17:47 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201409182217.s8IMHloQ098904@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Thu, 18 Sep 2014 22:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271844 - stable/10/contrib/openbsm/bin/auditdistd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 22:17:47 -0000 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");