* grub-core/normal/completion.c (grub_normal_do_completion): Free argv

on failure.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-08-28 15:31:21 +02:00
parent 9e0fa3f606
commit 46422ebf1a
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2010-08-28 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/normal/completion.c (grub_normal_do_completion): Free argv
on failure.
2010-08-28 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/normal/cmdline.c (grub_cmdline_get): Free cl_terms on

View file

@ -499,7 +499,10 @@ grub_normal_do_completion (char *buf, int *restore,
fail:
if (argc != 0)
grub_free (argv[0]);
{
grub_free (argv);
grub_free (argv[0]);
}
grub_free (match);
grub_errno = GRUB_ERR_NONE;