2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>

* kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
    * normal/completion.c (grub_normal_do_completion): Likewise.
    Reported by Hitoshi Ozeki.
This commit is contained in:
okuji 2007-09-03 20:28:24 +00:00
parent 6139dcd953
commit 508e39ee41
3 changed files with 17 additions and 4 deletions

View file

@ -473,18 +473,19 @@ grub_normal_do_completion (char *buf, int *restore,
if (num_found == 1)
grub_strcat (ret, suffix);
grub_free (match);
if (*ret == '\0')
{
grub_free (ret);
return 0;
goto fail;
}
grub_free (argv[0]);
grub_free (match);
return ret;
}
fail:
grub_free (argv[0]);
grub_free (match);
grub_errno = GRUB_ERR_NONE;