From 163ea4fa47e42491724f900817f0e83b90ab6d7e Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 14 Dec 1995 04:09:14 +0000 Subject: [PATCH] from netbsd; If we abort, make sure to free ep_emul_arg --- sys/kern/kern_exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.20.1