fs/hfs/hfs_open: Check that mount succeeded.
Found by: Coverity scan.
This commit is contained in:
parent
83543f937a
commit
4387ca78f0
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue