]> granicus.if.org Git - vim/commitdiff
patch 7.4.1130 v7.4.1130
authorBram Moolenaar <Bram@vim.org>
Mon, 18 Jan 2016 19:30:17 +0000 (20:30 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 18 Jan 2016 19:30:17 +0000 (20:30 +0100)
Problem:    Memory leak in :vimgrep.
Solution:   Call FreeWild(). (Yegappan Lakshmanan)

src/quickfix.c
src/version.c

index 003d0075df849b06cf19b4b76a1fd10d4711af69..21ac1c034639305a7b81256603ca6e9c3ac9d1de 100644 (file)
@@ -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. */
index ed7eddc35186264a9fcc3fc56a2525e1f3d62661..444d4b81711d743eedc33ba5a802c35a7cd9eecf 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1130,
 /**/
     1129,
 /**/