vim-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)
ee5b94a8ec
This commit is contained in:
Jan Edmund Lazo 2019-06-06 20:51:11 -04:00
parent bb4e0deaf9
commit e653f39f4f

View File

@ -4142,6 +4142,7 @@ void 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;