diff options
author | 2006-01-19 17:54:47 +0000 | |
---|---|---|
committer | 2006-01-19 17:54:47 +0000 | |
commit | 335c12dedbccf96c9cab566a194fb72d2d6fcc27 (patch) | |
tree | 653f5604ebf4339f251028acbdd75a7ea761b236 /sys/kern/kern_exec.c | |
parent | ENAMETOOLONG if path too long; ok miod pedro (diff) | |
download | wireguard-openbsd-335c12dedbccf96c9cab566a194fb72d2d6fcc27.tar.xz wireguard-openbsd-335c12dedbccf96c9cab566a194fb72d2d6fcc27.zip |
redo (w/ proper changes everywhere ;):
take interp[MAXPATHLEN] off the stack. from mickey, ok otto
while here, switch above from malloc to pool, remove stupid casts
tedu@ miod@ ok
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 3dc66fc2a06..2fa21ab332f 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.98 2005/12/07 19:04:53 deraadt Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.99 2006/01/19 17:54:47 mickey Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -675,7 +675,7 @@ bad: (void) fdrelease(p, pack.ep_fd); } if (pack.ep_interp != NULL) - FREE(pack.ep_interp, M_TEMP); + pool_put(&namei_pool, pack.ep_interp); if (pack.ep_emul_arg != NULL) FREE(pack.ep_emul_arg, M_TEMP); /* close and put the exec'd file */ @@ -704,7 +704,7 @@ exec_abort: uvm_deallocate(&vm->vm_map, VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS - VM_MIN_ADDRESS); if (pack.ep_interp != NULL) - FREE(pack.ep_interp, M_TEMP); + pool_put(&namei_pool, pack.ep_interp); if (pack.ep_emul_arg != NULL) FREE(pack.ep_emul_arg, M_TEMP); pool_put(&namei_pool, nid.ni_cnd.cn_pnbuf); |