Skip to content

Commit 42dd7ae

Browse files
committed
patch 7.4.1410
Problem: Leaking memory in cscope interface. Solution: Free memory when no tab is found. (Christian Brabandt)
1 parent 1858a84 commit 42dd7ae

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/if_cscope.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,7 +2062,10 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
20622062
strcpy(tbuf, matches[0]);
20632063
ptag = strtok(tbuf, "\t");
20642064
if (ptag == NULL)
2065+
{
2066+
vim_free(tbuf);
20652067
return;
2068+
}
20662069

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

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1410,
751753
/**/
752754
1409,
753755
/**/

0 commit comments

Comments
 (0)