From owner-svn-src-stable-8@FreeBSD.ORG Sat Oct 22 18:23:32 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F1731065673; Sat, 22 Oct 2011 18:23:32 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E5BE8FC18; Sat, 22 Oct 2011 18:23:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9MINWsR090889; Sat, 22 Oct 2011 18:23:32 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9MINWde090887; Sat, 22 Oct 2011 18:23:32 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110221823.p9MINWde090887@svn.freebsd.org> From: Christian Brueffer Date: Sat, 22 Oct 2011 18:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226641 - stable/8/sys/compat/linux X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 18:23:32 -0000 Author: brueffer Date: Sat Oct 22 18:23:32 2011 New Revision: 226641 URL: http://svn.freebsd.org/changeset/base/226641 Log: MFC: r226247, r226253 Properly free linux_gidset in case of an error. Modified: stable/8/sys/compat/linux/linux_uid16.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/compat/linux/linux_uid16.c ============================================================================== --- stable/8/sys/compat/linux/linux_uid16.c Sat Oct 22 18:20:12 2011 (r226640) +++ stable/8/sys/compat/linux/linux_uid16.c Sat Oct 22 18:23:32 2011 (r226641) @@ -113,8 +113,10 @@ linux_setgroups16(struct thread *td, str return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); - if (error) + if (error) { + free(linux_gidset, M_TEMP); return (error); + } newcred = crget(); p = td->td_proc; PROC_LOCK(p);