util/getroot: Add missing grub_disk_close.

Found by: Coverity scan.
This commit is contained in:
Vladimir Serbinenko 2015-01-26 09:54:14 +01:00
parent c4fcfd8744
commit 866f469683
1 changed files with 4 additions and 1 deletions

View File

@ -417,7 +417,10 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
name = grub_util_get_ldm (disk, ctx.start);
if (name)
return name;
{
grub_disk_close (disk);
return name;
}
ctx.partname = NULL;