* 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:
parent
13548d26e9
commit
cad3237fb5
2 changed files with 12 additions and 1 deletions
|
@ -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>
|
||||
|
||||
* 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. */
|
||||
if (fstat (fd, &st) < 0)
|
||||
{
|
||||
close (fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
close (fd);
|
||||
|
||||
#if defined(__NetBSD__)
|
||||
if (major(st.st_rdev) == RAW_FLOPPY_MAJOR)
|
||||
|
|
Loading…
Reference in a new issue