diff options
author | kib <kib@FreeBSD.org> | 2015-04-27 12:54:04 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-04-27 12:54:04 +0000 |
commit | bcef2e5533f44c10efe92eba05aef18e3881ebe1 (patch) | |
tree | 5b2a3cc7526666d4804ff99d9c3c2b89d8b42d56 /sys | |
parent | e86f81bbc7c464fbde610f5df9b2c85e1e1b5ca8 (diff) | |
download | FreeBSD-src-bcef2e5533f44c10efe92eba05aef18e3881ebe1.zip FreeBSD-src-bcef2e5533f44c10efe92eba05aef18e3881ebe1.tar.gz |
MFC r272290 (by mjg):
Use bzero instead of explicitly zeroing stuff in do_execve.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_exec.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index a76511b..9b6e1ba 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -382,29 +382,10 @@ do_execve(td, args, mac_p) /* * Initialize part of the common data */ + bzero(imgp, sizeof(*imgp)); imgp->proc = p; - imgp->execlabel = NULL; imgp->attr = &attr; - imgp->entry_addr = 0; - imgp->reloc_base = 0; - imgp->vmspace_destroyed = 0; - imgp->interpreted = 0; - imgp->opened = 0; - imgp->interpreter_name = NULL; - imgp->auxargs = NULL; - imgp->vp = NULL; - imgp->object = NULL; - imgp->firstpage = NULL; - imgp->ps_strings = 0; - imgp->auxarg_size = 0; imgp->args = args; - imgp->execpath = imgp->freepath = NULL; - imgp->execpathp = 0; - imgp->canary = 0; - imgp->canarylen = 0; - imgp->pagesizes = 0; - imgp->pagesizeslen = 0; - imgp->stack_prot = 0; #ifdef MAC error = mac_execve_enter(imgp, mac_p); @@ -412,8 +393,6 @@ do_execve(td, args, mac_p) goto exec_fail; #endif - imgp->image_header = NULL; - /* * Translate the file name. namei() returns a vnode pointer * in ni_vp amoung other things. |