From 46422ebf1acf49b9f7fe7cb7cfc48a6dcb525b63 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 28 Aug 2010 15:31:21 +0200 Subject: [PATCH] * grub-core/normal/completion.c (grub_normal_do_completion): Free argv on failure. --- ChangeLog | 5 +++++ grub-core/normal/completion.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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;