* grub-core/commands/legacycfg.c (grub_legacy_check_md5_password): Plug

memory leak.
This commit is contained in:
Vladimir Serbinenko 2013-11-18 02:37:46 +01:00
parent 59c943ecf6
commit da93d6753b
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/commands/legacycfg.c (grub_legacy_check_md5_password): Plug
memory leak.
2013-11-18 Vladimir Serbinenko <phcoder@gmail.com> 2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/powerpc/setjmp.S (grub_setjmp): Save r31. * grub-core/lib/powerpc/setjmp.S (grub_setjmp): Save r31.

View file

@ -735,6 +735,7 @@ grub_legacy_check_md5_password (int argc, char **args,
char *entered) char *entered)
{ {
struct legacy_md5_password *pw = NULL; struct legacy_md5_password *pw = NULL;
int ret;
if (args[0][0] != '-' || args[0][1] != '-') if (args[0][0] != '-' || args[0][1] != '-')
{ {
@ -751,7 +752,9 @@ grub_legacy_check_md5_password (int argc, char **args,
if (!pw) if (!pw)
return 0; return 0;
return check_password_md5_real (entered, pw); ret = check_password_md5_real (entered, pw);
grub_free (pw);
return ret;
} }
static grub_err_t static grub_err_t