password_pbkdf2: fix memory leak

Found by: Coverity scan.
CID: 96676
This commit is contained in:
Andrei Borzenkov 2015-06-20 23:38:19 +03:00
parent 152695d0fa
commit 2f01f08103

View file

@ -104,7 +104,10 @@ grub_cmd_password (grub_command_t cmd __attribute__ ((unused)),
pass->c = grub_strtoul (ptr, &ptr, 0);
if (grub_errno)
return grub_errno;
{
grub_free (pass);
return grub_errno;
}
if (*ptr != '.')
{
grub_free (pass);