normal/misc: Close device on all pathes.

Found by: Coverity scan.
This commit is contained in:
Vladimir Serbinenko 2015-01-26 09:49:32 +01:00
parent 73b1e83839
commit 6603c22f31

View file

@ -184,10 +184,11 @@ grub_normal_print_device_info (const char *name)
/* TRANSLATORS: Replace dot with appropriate decimal separator for
your language. */
(grub_disk_get_size (dev->disk) & 1) ? _(".5") : "");
grub_device_close (dev);
}
if (dev)
grub_device_close (dev);
grub_xputs ("\n");
return grub_errno;
}