From da93d6753b6a914708d042b08768599873d3f6c7 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 18 Nov 2013 02:37:46 +0100 Subject: [PATCH] * grub-core/commands/legacycfg.c (grub_legacy_check_md5_password): Plug memory leak. --- ChangeLog | 5 +++++ grub-core/commands/legacycfg.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 49d75e070..57e82f05c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-18 Vladimir Serbinenko + + * grub-core/commands/legacycfg.c (grub_legacy_check_md5_password): Plug + memory leak. + 2013-11-18 Vladimir Serbinenko * grub-core/lib/powerpc/setjmp.S (grub_setjmp): Save r31. diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c index 4443341b4..f429a5d1b 100644 --- a/grub-core/commands/legacycfg.c +++ b/grub-core/commands/legacycfg.c @@ -735,6 +735,7 @@ grub_legacy_check_md5_password (int argc, char **args, char *entered) { struct legacy_md5_password *pw = NULL; + int ret; if (args[0][0] != '-' || args[0][1] != '-') { @@ -751,7 +752,9 @@ grub_legacy_check_md5_password (int argc, char **args, if (!pw) 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