fix malloc type mismatches.

This commit is contained in:
yamt 2008-01-03 14:25:49 +00:00
parent 40f32b06ab
commit 97436a1e88
3 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: darwin_exec.c,v 1.52 2007/12/08 18:35:56 dsl Exp $ */
/* $NetBSD: darwin_exec.c,v 1.53 2008/01/03 14:25:49 yamt Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include "opt_compat_darwin.h" /* For COMPAT_DARWIN in mach_port.h */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.52 2007/12/08 18:35:56 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.53 2008/01/03 14:25:49 yamt Exp $");
#include "opt_syscall_debug.h"
@ -214,7 +214,7 @@ exec_darwin_copyargs(struct lwp *l, struct exec_package *pack, struct ps_strings
*stackp = (char *)cpp;
/* We don't need this anymore */
free(pack->ep_emul_arg, M_EXEC);
free(pack->ep_emul_arg, M_TEMP);
pack->ep_emul_arg = NULL;
return 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mach_exec.c,v 1.66 2007/12/08 18:36:14 dsl Exp $ */
/* $NetBSD: mach_exec.c,v 1.67 2008/01/03 14:25:50 yamt Exp $ */
/*-
* Copyright (c) 2001-2003 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mach_exec.c,v 1.66 2007/12/08 18:36:14 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: mach_exec.c,v 1.67 2008/01/03 14:25:50 yamt Exp $");
#include "opt_syscall_debug.h"
@ -167,7 +167,7 @@ exec_mach_copyargs(struct lwp *l, struct exec_package *pack, struct ps_strings *
*stackp += len + 1;
/* We don't need this anymore */
free(pack->ep_emul_arg, M_EXEC);
free(pack->ep_emul_arg, M_TEMP);
pack->ep_emul_arg = NULL;
len = len % sizeof(zero);

View File

@ -1,4 +1,4 @@
/* $NetBSD: exec_macho.c,v 1.40 2007/12/08 19:29:46 pooka Exp $ */
/* $NetBSD: exec_macho.c,v 1.41 2008/01/03 14:25:50 yamt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: exec_macho.c,v 1.40 2007/12/08 19:29:46 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: exec_macho.c,v 1.41 2008/01/03 14:25:50 yamt Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -579,7 +579,7 @@ exec_macho_makecmds(struct lwp *l, struct exec_package *epp)
if (error)
return (error);
emea = malloc(sizeof(struct exec_macho_emul_arg), M_EXEC, M_WAITOK);
emea = malloc(sizeof(struct exec_macho_emul_arg), M_TEMP, M_WAITOK);
epp->ep_emul_arg = (void *)emea;
emea->dynamic = 0;
@ -615,6 +615,6 @@ exec_macho_makecmds(struct lwp *l, struct exec_package *epp)
bad:
kill_vmcmds(&epp->ep_vmcmds);
bad2:
free(emea, M_EXEC);
free(emea, M_TEMP);
return error;
}