* 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
|
@ -1866,7 +1866,12 @@ grub_util_biosdisk_is_floppy (grub_disk_t disk)
|
|||
|
||||
/* 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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue