changeset 13660:2d94fcb0277d v8.0.1702

patch 8.0.1702: leaking memory when autocommands make quickfix list invalid commit https://github.com/vim/vim/commit/ee5b94a8ecbaeafa11c7c7c8cf7bef765fbea912 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 12 20:35:05 2018 +0200 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)
author Christian Brabandt <cb@256bit.org>
date Thu, 12 Apr 2018 20:45:06 +0200
parents 9d20ac681096
children 1bde4f0fb366
files src/quickfix.c src/version.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- a/src/version.c
+++ b/src/version.c
@@ -763,6 +763,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1702,
+/**/
     1701,
 /**/
     1700,