1
0
forked from aniani/vim

patch 7.4.1410

Problem:    Leaking memory in cscope interface.
Solution:   Free memory when no tab is found. (Christian Brabandt)
This commit is contained in:
Bram Moolenaar
2016-02-23 22:50:12 +01:00
parent 1858a842af
commit 42dd7aee41
2 changed files with 5 additions and 0 deletions

View File

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