Christian Brabandt wrote:

> 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);

Thanks!

-- 
TALL KNIGHT: We are now no longer the Knights Who Say Ni!
ONE KNIGHT:  Ni!
OTHERS:      Sh!
ONE KNIGHT:  (whispers) Sorry.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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