changeset 7662:4d34891e98f4 v7.4.1130

commit https://github.com/vim/vim/commit/61ff4dd6a4d47bd32383fe28087be2b37dec53f4 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 18 20:30:17 2016 +0100 patch 7.4.1130 Problem: Memory leak in :vimgrep. Solution: Call FreeWild(). (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Mon, 18 Jan 2016 20:45:04 +0100
parents 5953485bada9
children c4b2ec5485e5
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
@@ -3465,7 +3465,10 @@ ex_vimgrep(eap)
     dirname_start = alloc_id(MAXPATHL, aid_qf_dirname_start);
     dirname_now = alloc_id(MAXPATHL, aid_qf_dirname_now);
     if (dirname_start == NULL || dirname_now == NULL)
+    {
+	FreeWild(fcount, fnames);
 	goto theend;
+    }
 
     /* Remember the current directory, because a BufRead autocommand that does
      * ":lcd %:p:h" changes the meaning of short path names. */
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1130,
+/**/
     1129,
 /**/
     1128,