diff src/quickfix.c @ 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 9a4c9dccd603
children 075810b0cb6c
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. */