From 97436a1e887baed615ce072a9d8d9f7f8d0daef2 Mon Sep 17 00:00:00 2001 From: yamt Date: Thu, 3 Jan 2008 14:25:49 +0000 Subject: [PATCH] fix malloc type mismatches. --- sys/compat/darwin/darwin_exec.c | 6 +++--- sys/compat/mach/mach_exec.c | 6 +++--- sys/kern/exec_macho.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/compat/darwin/darwin_exec.c b/sys/compat/darwin/darwin_exec.c index 6217169b178d..d8362c3a565a 100644 --- a/sys/compat/darwin/darwin_exec.c +++ b/sys/compat/darwin/darwin_exec.c @@ -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 -__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; diff --git a/sys/compat/mach/mach_exec.c b/sys/compat/mach/mach_exec.c index 2463b2dd3079..5b1f80e47f8c 100644 --- a/sys/compat/mach/mach_exec.c +++ b/sys/compat/mach/mach_exec.c @@ -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 -__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); diff --git a/sys/kern/exec_macho.c b/sys/kern/exec_macho.c index 42b022b5d967..f8dae7f08cea 100644 --- a/sys/kern/exec_macho.c +++ b/sys/kern/exec_macho.c @@ -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 -__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 #include @@ -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; }