From: Vladimir Serbinenko Date: Sat, 24 Jan 2015 20:18:36 +0000 (+0100) Subject: commands/nativedisk: Add missing device_close. X-Git-Tag: 2.02-beta3~530 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd50aa323d30d064563c213ab7ee8b8846981609;p=thirdparty%2Fgrub.git commands/nativedisk: Add missing device_close. Found by: Coverity scan. --- diff --git a/grub-core/commands/nativedisk.c b/grub-core/commands/nativedisk.c index 33b6b99ea..b3bc4639c 100644 --- a/grub-core/commands/nativedisk.c +++ b/grub-core/commands/nativedisk.c @@ -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. */