From: Vladimir 'phcoder' Serbinenko Date: Sat, 28 Aug 2010 13:31:21 +0000 (+0200) Subject: * grub-core/normal/completion.c (grub_normal_do_completion): Free argv X-Git-Tag: 1.99~639 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46422ebf1acf49b9f7fe7cb7cfc48a6dcb525b63;p=thirdparty%2Fgrub.git * grub-core/normal/completion.c (grub_normal_do_completion): Free argv on failure. --- diff --git a/ChangeLog b/ChangeLog index 39e6a4f16..0779d7c8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-08-28 Vladimir Serbinenko + + * grub-core/normal/completion.c (grub_normal_do_completion): Free argv + on failure. + 2010-08-28 Vladimir Serbinenko * grub-core/normal/cmdline.c (grub_cmdline_get): Free cl_terms on diff --git a/grub-core/normal/completion.c b/grub-core/normal/completion.c index 40a645fb4..d127f9baf 100644 --- a/grub-core/normal/completion.c +++ b/grub-core/normal/completion.c @@ -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;