* grub-core/loader/i386/bsd.c (grub_bsd_load): Handle relocator failure

if it happens.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-06-27 13:57:03 +02:00
parent 5ff1d945ed
commit d0b526b277
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2011-06-27 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/loader/i386/bsd.c (grub_bsd_load): Handle relocator failure
if it happens.
2011-06-27 Vladimir Serbinenko <phcoder@gmail.com>
Implement time command.

View file

@ -1322,6 +1322,11 @@ grub_bsd_load (int argc, char *argv[])
goto fail;
relocator = grub_relocator_new ();
if (!relocator)
{
grub_file_close (file);
goto fail;
}
elf = grub_elf_file (file);
if (elf)
@ -1343,7 +1348,7 @@ grub_bsd_load (int argc, char *argv[])
fail:
if (grub_errno != GRUB_ERR_NONE)
grub_dl_unref (my_mod);
grub_dl_unref (my_mod);
return grub_errno;
}