Module Name:    src
Committed By:   christos
Date:           Fri Feb  3 03:54:35 UTC 2012

Modified Files:
        src/sys/compat/netbsd32: netbsd32_exec_elf32.c

Log Message:
elf_args needs to be freed with kmem_free() since it is now allocated with
kmem_alloc(). Should fix running 32 bit elf binaries.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/compat/netbsd32/netbsd32_exec_elf32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_exec_elf32.c
diff -u src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.33 src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.34
--- src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.33	Mon Mar  7 00:09:12 2011
+++ src/sys/compat/netbsd32/netbsd32_exec_elf32.c	Thu Feb  2 22:54:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_exec_elf32.c,v 1.33 2011/03/07 05:09:12 joerg Exp $	*/
+/*	$NetBSD: netbsd32_exec_elf32.c,v 1.34 2012/02/03 03:54:35 christos Exp $	*/
 /*	from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
 
 /*
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.33 2011/03/07 05:09:12 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.34 2012/02/03 03:54:35 christos Exp $");
 
 #define	ELFSIZE		32
 
@@ -196,7 +196,7 @@ netbsd32_elf32_copyargs(struct lwp *l, s
 		a->a_v = kauth_cred_getgid(l->l_cred);
 		a++;
 
-		free((char *)ap, M_TEMP);
+		kmem_free(ap, sizeof(*ap));
 		pack->ep_emul_arg = NULL;
 	}
 

Reply via email to