From 520743674ab70e035644571d4c15dad9ce058ea8 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Mon, 4 Nov 2013 18:23:56 +0100 Subject: kern: fix the error handling in exec_load Found using the Clang Static Analyzer. * kern/elf-load.c (exec_load): Properly propagate errors. --- kern/elf-load.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kern/elf-load.c') 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; } } -- cgit v1.2.3