password_pbkdf2: fix memory leak
Found by: Coverity scan. CID: 96676
This commit is contained in:
parent
152695d0fa
commit
2f01f08103
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue