parttool: fix memory leak

Found by: Coverity scan.
CID: 96652
This commit is contained in:
Andrei Borzenkov 2016-01-12 20:41:44 +03:00
parent 1bff60e5aa
commit 5db2190f2c

View file

@ -283,6 +283,7 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)),
}
if (! cur)
{
grub_free (parsed);
grub_device_close (dev);
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("unknown argument `%s'"),
args[i]);