mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Close
file after stat. Reported by: David Volgyes <dvolgyes>.
This commit is contained in:
1 parent
13548d26e9
commit
cad3237fb5
2 files changed
+11
No files matched your search
@@ -1,3 +1,9 @@
|
|||||||
|
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>
|
2011-06-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* util/raid.c (grub_util_raid_getmembers): Close fd before returning.
|
* util/raid.c (grub_util_raid_getmembers): Close fd before returning.
|
||||||
|
|||||||
@@ -1866,7 +1866,12 @@ grub_util_biosdisk_is_floppy (grub_disk_t disk)
|
|||||||
|
|
||||||
/* Shouldn't happen either. */
|
/* Shouldn't happen either. */
|
||||||
if (fstat (fd, &st) < 0)
|
if (fstat (fd, &st) < 0)
|
||||||
|
{
|
||||||
|
close (fd);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
close (fd);
|
||||||
|
|
||||||
#if defined(__NetBSD__)
|
#if defined(__NetBSD__)
|
||||||
if (major(st.st_rdev) == RAW_FLOPPY_MAJOR)
|
if (major(st.st_rdev) == RAW_FLOPPY_MAJOR)
|
||||||
|
|||||||
Reference in new issue
Block a user