mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
safe filedescriptors
git-svn-id: svn://coreboot.org/openbios/openbios-devel@44 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user