Hi Bram!

On Di, 23 Feb 2016, Bram Moolenaar wrote:

> 
> Patch 7.4.1406
> Problem:    Leaking memory in cs_print_tags_priv().
> Solution:   Free tbuf. (idea by Forrest Fleming)
> Files:      src/if_cscope.c

I think, we also need this:

index b5ca614..2f75390 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -2062,7 +2062,10 @@ cs_print_tags_priv(char **matches, char **cntxts, int 
num_matches)
     strcpy(tbuf, matches[0]);
     ptag = strtok(tbuf, "\t");
     if (ptag == NULL)
+    {
+       vim_free(tbuf);
        return;
+    }

     newsize = (int)(strlen(cstag_msg) + strlen(ptag));
     buf = (char *)alloc(newsize);


Best,
Christian
-- 
Lieber unruhige Pausen, als pausenlos unruhig.

-- 
-- 
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.

Raspunde prin e-mail lui