Skip to content

Commit ee5b94a

Browse files
committed
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)
1 parent cccd62d commit ee5b94a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/quickfix.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4556,7 +4556,10 @@ ex_vimgrep(exarg_T *eap)
45564556
/* Check whether the quickfix list is still valid. When loading a
45574557
* buffer above, autocommands might have changed the quickfix list. */
45584558
if (!vgr_qflist_valid(wp, qi, save_qfid, *eap->cmdlinep))
4559+
{
4560+
FreeWild(fcount, fnames);
45594561
goto theend;
4562+
}
45604563
save_qfid = qi->qf_lists[qi->qf_curlist].qf_id;
45614564

45624565
if (buf == NULL)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,8 @@ static char *(features[]) =
762762

763763
static int included_patches[] =
764764
{ /* Add new patch number below this line */
765+
/**/
766+
1702,
765767
/**/
766768
1701,
767769
/**/

0 commit comments

Comments
 (0)