From owner-svn-src-head@freebsd.org Fri Oct 16 14:55:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18067A16792; Fri, 16 Oct 2015 14:55:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D31A619C9; Fri, 16 Oct 2015 14:55:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9GEtdI6062793; Fri, 16 Oct 2015 14:55:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9GEtdDw062792; Fri, 16 Oct 2015 14:55:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510161455.t9GEtdDw062792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 16 Oct 2015 14:55:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289423 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 14:55:41 -0000 Author: kib Date: Fri Oct 16 14:55:39 2015 New Revision: 289423 URL: https://svnweb.freebsd.org/changeset/base/289423 Log: If falloc_caps() failed, cleanup needs to be performed. This is a bug in r289026. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_fork.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Fri Oct 16 14:45:21 2015 (r289422) +++ head/sys/kern/kern_fork.c Fri Oct 16 14:55:39 2015 (r289423) @@ -848,7 +848,7 @@ fork1(struct thread *td, int flags, int if (flags & RFPROCDESC) { error = falloc_caps(td, &fp_procdesc, procdescp, 0, fcaps); if (error != 0) - return (error); + goto fail2; } mem_charged = 0;