]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.0.1702: leaking memory when autocommands make quickfix list invalid v8.0.1702
authorBram Moolenaar <Bram@vim.org>
Thu, 12 Apr 2018 18:35:05 +0000 (20:35 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 12 Apr 2018 18:35:05 +0000 (20:35 +0200)
Problem:    Leaking memory when autocommands make a quickfix list invalid.
Solution:   Call FreeWild(). (Yegappan Lakshmanan)

src/quickfix.c
src/version.c

index 8c1df17938d321d13150b7626f1f2d935e2804ae..c370761bf20aba56f33c2fbdf31e78f7760b2af7 100644 (file)
@@ -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)
index 2b0105b0b5b948c270a0fb5b4914b76bad80f1fe..035f68c31dbae1c1126c1f6c7491027cfc7efca7 100644 (file)
@@ -762,6 +762,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1702,
 /**/
     1701,
 /**/