file after stat.
Reported by: David Volgyes <dvolgyes>.
+2011-06-23 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Close
+ file after stat.
+ Reported by: David Volgyes <dvolgyes>.
+
2011-06-23 Vladimir Serbinenko <phcoder@gmail.com>
* util/raid.c (grub_util_raid_getmembers): Close fd before returning.
/* Shouldn't happen either. */
if (fstat (fd, &st) < 0)
- return 0;
+ {
+ close (fd);
+ return 0;
+ }
+
+ close (fd);
#if defined(__NetBSD__)
if (major(st.st_rdev) == RAW_FLOPPY_MAJOR)