summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_aout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/imgact_aout.c')
-rw-r--r--sys/kern/imgact_aout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index 7f202d9..45b39c2 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -198,9 +198,11 @@ exec_aout_imgact(imgp)
/*
* Destroy old process VM and create a new one (with a new stack)
*/
- exec_new_vmspace(imgp, &aout_sysvec);
+ error = exec_new_vmspace(imgp, &aout_sysvec);
vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY, td);
+ if (error)
+ return (error);
/*
* The vm space can be changed by exec_new_vmspace
OpenPOWER on IntegriCloud