Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Oct 2011 18:23:32 +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-8@freebsd.org
Subject:   svn commit: r226641 - stable/8/sys/compat/linux
Message-ID:  <201110221823.p9MINWde090887@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



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