mirror of
http://cgit.git.savannah.gnu.org/git/grub.git
synced 2026-04-28 06:33:17 +00:00
commands/nativedisk: Add missing device_close.
Found by: Coverity scan.
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user