commands/nativedisk: Add missing device_close.

Found by: Coverity scan.
This commit is contained in:
Vladimir Serbinenko 2015-01-24 21:18:36 +01:00
parent 72bbd8046a
commit bd50aa323d

View file

@ -57,6 +57,7 @@ get_uuid (const char *name, char **uuid, int getnative)
if (!dev->disk)
{
grub_dprintf ("nativedisk", "Skipping non-disk\n");
grub_device_close (dev);
return 0;
}
@ -90,6 +91,7 @@ get_uuid (const char *name, char **uuid, int getnative)
case GRUB_DISK_DEVICE_MEMDISK_ID:
grub_dprintf ("nativedisk", "Skipping native disk %s\n",
dev->disk->name);
grub_device_close (dev);
return 0;
/* FIXME: those probably need special handling. */