summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kern/elf-load.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kern/elf-load.c b/kern/elf-load.c
index 1d103d3..441276e 100644
--- a/kern/elf-load.c
+++ b/kern/elf-load.c
@@ -80,6 +80,8 @@ int exec_load(exec_read_func_t *read, exec_read_exec_func_t *read_exec,
result = (*read_exec)(handle,
ph->p_offset, ph->p_filesz,
ph->p_vaddr, ph->p_memsz, type);
+ if (result)
+ return result;
}
}