Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Oct 2011 18:20:12 +0000 (UTC)
From:      Christian Brueffer <brueffer@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r226640 - stable/9/sys/compat/linux
Message-ID:  <201110221820.p9MIKCVt090720@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brueffer
Date: Sat Oct 22 18:20:12 2011
New Revision: 226640
URL: http://svn.freebsd.org/changeset/base/226640

Log:
  MFC: r226247, r226253
  
  Properly free linux_gidset in case of an error.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/compat/linux/linux_uid16.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/compat/linux/linux_uid16.c
==============================================================================
--- stable/9/sys/compat/linux/linux_uid16.c	Sat Oct 22 18:06:56 2011	(r226639)
+++ stable/9/sys/compat/linux/linux_uid16.c	Sat Oct 22 18:20:12 2011	(r226640)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110221820.p9MIKCVt090720>