commands/parttool: Add missing device close.
Found by: Coverity scan.
This commit is contained in:
parent
bd50aa323d
commit
4947f11b09
1 changed files with 10 additions and 2 deletions
|
@ -243,11 +243,19 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)),
|
|||
}
|
||||
|
||||
if (argc == 1)
|
||||
return show_help (dev);
|
||||
{
|
||||
err = show_help (dev);
|
||||
grub_device_close (dev);
|
||||
return err;
|
||||
}
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
if (grub_strcmp (args[i], "help") == 0)
|
||||
return show_help (dev);
|
||||
{
|
||||
err = show_help (dev);
|
||||
grub_device_close (dev);
|
||||
return err;
|
||||
}
|
||||
|
||||
parsed = (int *) grub_zalloc (argc * sizeof (int));
|
||||
|
||||
|
|
Loading…
Reference in a new issue