diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-11-04 18:23:56 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-11-11 12:46:58 +0100 |
commit | 520743674ab70e035644571d4c15dad9ce058ea8 (patch) | |
tree | 1af386c0200c0d21690606e65657ef320b6caa24 /kern | |
parent | 306d4abeb55cd8962e858563e24e5a5b8504edaa (diff) |
kern: fix the error handling in exec_load
Found using the Clang Static Analyzer.
* kern/elf-load.c (exec_load): Properly propagate errors.
Diffstat (limited to 'kern')
-rw-r--r-- | kern/elf-load.c | 2 |
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; } } |