fs/fat: Fix codepath to properly free on error.

Found by: Coverity scan.
This commit is contained in:
Vladimir Serbinenko 2015-01-25 01:27:44 +01:00
parent faad548ce3
commit 83543f937a

View file

@ -1136,7 +1136,7 @@ grub_fat_label (grub_device_t device, char **label)
if (! (data->attr & GRUB_FAT_ATTR_DIRECTORY))
{
grub_error (GRUB_ERR_BAD_FILE_TYPE, N_("not a directory"));
return 0;
goto fail;
}
err = grub_fat_iterate_init (&ctxt);