summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1995-12-14 04:09:14 +0000
committerderaadt <deraadt@openbsd.org>1995-12-14 04:09:14 +0000
commit163ea4fa47e42491724f900817f0e83b90ab6d7e (patch)
tree2f64f52502830af19b52daf40e7b619916e8d776
parentfrom netbsd; init proc0 fd0 differently (diff)
downloadwireguard-openbsd-163ea4fa47e42491724f900817f0e83b90ab6d7e.tar.xz
wireguard-openbsd-163ea4fa47e42491724f900817f0e83b90ab6d7e.zip
from netbsd; If we abort, make sure to free ep_emul_arg
-rw-r--r--sys/kern/kern_exec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 4dbee081e36..8c902c2a829 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.72 1995/10/07 06:28:11 mycroft Exp $ */
+/* $NetBSD: kern_exec.c,v 1.73 1995/12/09 04:11:00 mycroft Exp $ */
/*-
* Copyright (C) 1993, 1994 Christopher G. Demetriou
@@ -508,6 +508,8 @@ exec_abort:
*/
vm_deallocate(&vm->vm_map, VM_MIN_ADDRESS,
VM_MAXUSER_ADDRESS - VM_MIN_ADDRESS);
+ if (pack.ep_emul_arg)
+ FREE(pack.ep_emul_arg, M_TEMP);
FREE(nid.ni_cnd.cn_pnbuf, M_NAMEI);
VOP_CLOSE(pack.ep_vp, FREAD, cred, p);
vput(pack.ep_vp);