safe filedescriptors

git-svn-id: svn://coreboot.org/openbios/openbios-devel@44 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Stefan Reinauer
2006-06-05 19:40:05 +00:00
parent 280a06e3d9
commit 65bae45b24
4 changed files with 15 additions and 1 deletions

View File

@@ -589,8 +589,10 @@ int linux_load(struct sys_info *info, const char *file, const char *cmdline)
return -1;
kern_addr = load_linux_header(&hdr);
if (kern_addr == 0)
if (kern_addr == 0) {
file_close();
return LOADER_NOT_SUPPORT;
}
params = phys_to_virt(LINUX_PARAM_LOC);
init_linux_params(params, &hdr);