fs/hfs/hfs_open: Check that mount succeeded.

Found by: Coverity scan.
This commit is contained in:
Vladimir Serbinenko 2015-01-25 01:28:17 +01:00
parent 83543f937a
commit 4387ca78f0

View file

@ -1306,6 +1306,12 @@ grub_hfs_open (struct grub_file *file, const char *name)
data = grub_hfs_mount (file->device->disk); data = grub_hfs_mount (file->device->disk);
if (!data)
{
grub_dl_unref (my_mod);
return grub_errno;
}
if (grub_hfs_find_dir (data, name, &frec, 0)) if (grub_hfs_find_dir (data, name, &frec, 0))
{ {
grub_free (data); grub_free (data);