From: Bram Moolenaar Date: Thu, 12 Apr 2018 18:35:05 +0000 (+0200) Subject: patch 8.0.1702: leaking memory when autocommands make quickfix list invalid X-Git-Tag: v8.0.1702 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee5b94a8ecbaeafa11c7c7c8cf7bef765fbea912;p=thirdparty%2Fvim.git patch 8.0.1702: leaking memory when autocommands make quickfix list invalid Problem: Leaking memory when autocommands make a quickfix list invalid. Solution: Call FreeWild(). (Yegappan Lakshmanan) --- diff --git a/src/quickfix.c b/src/quickfix.c index 8c1df17938..c370761bf2 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) diff --git a/src/version.c b/src/version.c index 2b0105b0b5..035f68c31d 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1702, /**/ 1701, /**/