summaryrefslogtreecommitdiff
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-12 20:35:05 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-12 20:35:05 +0200
commitee5b94a8ecbaeafa11c7c7c8cf7bef765fbea912 (patch)
treee5a095df73850c7aa5aa9d5fe2517f37ba51c51e /src/quickfix.c
parentcccd62d435097814ea93e384920443fb2419e663 (diff)
downloadvim-git-ee5b94a8ecbaeafa11c7c7c8cf7bef765fbea912.tar.gz
patch 8.0.1702: leaking memory when autocommands make quickfix list invalidv8.0.1702
Problem: Leaking memory when autocommands make a quickfix list invalid. Solution: Call FreeWild(). (Yegappan Lakshmanan)
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 8c1df1793..c370761bf 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4556,7 +4556,10 @@ ex_vimgrep(exarg_T *eap)
/* Check whether the quickfix list is still valid. When loading a
* buffer above, autocommands might have changed the quickfix list. */
if (!vgr_qflist_valid(wp, qi, save_qfid, *eap->cmdlinep))
+ {
+ FreeWild(fcount, fnames);
goto theend;
+ }
save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
if (buf == NULL)