svn commit: r226641 - stable/8/sys/compat/linux

Christian Brueffer brueffer at FreeBSD.org
Sat Oct 22 18:23:32 UTC 2011


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);


More information about the svn-src-all mailing list