Hi all,

Valgrind detected a memory leak in the ex_vimgrep() function when running
the Test_nomem() function in the test_quickfix.vim file. The attached patch
fixes this leak.

- Yegappan

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/quickfix.c b/src/quickfix.c
index 003d007..21ac1c0 100644
--- 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. */

Raspunde prin e-mail lui