aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/imgact_elf.c
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2017-01-24 22:46:43 +0000
committerEd Maste <emaste@FreeBSD.org>2017-01-24 22:46:43 +0000
commit77ebe276ba7a6c119e785e32ef51d933f975af47 (patch)
treef5d936ca9bf3c55d97bc9ed62065fa1ac6f7edc2 /sys/kern/imgact_elf.c
parent736ff8c3967babd610845c11516a17f203a18622 (diff)
downloadsrc-77ebe276ba7a6c119e785e32ef51d933f975af47.tar.gz
src-77ebe276ba7a6c119e785e32ef51d933f975af47.zip
Notes
Diffstat (limited to 'sys/kern/imgact_elf.c')
-rw-r--r--sys/kern/imgact_elf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index c25ef3f3c89b..03040f2fab71 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -859,6 +859,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
error = ENOEXEC;
goto ret;
}
+ et_dyn_addr = 0;
if (hdr->e_type == ET_DYN) {
if ((brand_info->flags & BI_CAN_EXEC_DYN) == 0) {
uprintf("Cannot execute shared object\n");
@@ -871,10 +872,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
*/
if (baddr == 0)
et_dyn_addr = ET_DYN_LOAD_ADDR;
- else
- et_dyn_addr = 0;
- } else
- et_dyn_addr = 0;
+ }
sv = brand_info->sysvec;
if (interp != NULL && brand_info->interp_newpath != NULL)
newinterp = brand_info->interp_newpath;
@@ -1058,7 +1056,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp)
imgp->reloc_base = addr;
imgp->proc->p_osrel = osrel;
- ret:
+ret:
free(interp_buf, M_TEMP);
return (error);
}