From owner-svn-src-all@FreeBSD.ORG Thu Feb 20 21:36:05 2014 Return-Path: Delivered-To: svn-src-all@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 BFAA57E; Thu, 20 Feb 2014 21:36:05 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A8D741348; Thu, 20 Feb 2014 21:36:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1KLa5MT066524; Thu, 20 Feb 2014 21:36:05 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1KLa5wH066523; Thu, 20 Feb 2014 21:36:05 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201402202136.s1KLa5wH066523@svn.freebsd.org> From: Mateusz Guzik Date: Thu, 20 Feb 2014 21:36:05 +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: r262259 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Feb 2014 21:36:05 -0000 Author: mjg Date: Thu Feb 20 21:36:05 2014 New Revision: 262259 URL: http://svnweb.freebsd.org/changeset/base/262259 Log: MFC r260233: Plug a memory leak in dup2 when both old and new fd have ioctl caps. Modified: stable/10/sys/kern/kern_descrip.c Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Thu Feb 20 21:32:24 2014 (r262258) +++ stable/10/sys/kern/kern_descrip.c Thu Feb 20 21:36:05 2014 (r262259) @@ -879,6 +879,7 @@ do_dup(struct thread *td, int flags, int /* * Duplicate the source descriptor. */ + filecaps_free(&newfde->fde_caps); *newfde = *oldfde; filecaps_copy(&oldfde->fde_caps, &newfde->fde_caps); if ((flags & DUP_CLOEXEC) != 0)