mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 7.4.1406
Problem: Leaking memory in cs_print_tags_priv(). Solution: Free tbuf. (idea by Forrest Fleming)
This commit is contained in:
@@ -2092,12 +2092,13 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
|
|||||||
continue;
|
continue;
|
||||||
(void)strcpy(tbuf, matches[idx]);
|
(void)strcpy(tbuf, matches[idx]);
|
||||||
|
|
||||||
if (strtok(tbuf, (const char *)"\t") == NULL)
|
if (strtok(tbuf, (const char *)"\t") == NULL
|
||||||
continue;
|
|| (fname = strtok(NULL, (const char *)"\t")) == NULL
|
||||||
if ((fname = strtok(NULL, (const char *)"\t")) == NULL)
|
|| (lno = strtok(NULL, (const char *)"\t")) == NULL)
|
||||||
continue;
|
{
|
||||||
if ((lno = strtok(NULL, (const char *)"\t")) == NULL)
|
vim_free(tbuf);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
extra = strtok(NULL, (const char *)"\t");
|
extra = strtok(NULL, (const char *)"\t");
|
||||||
|
|
||||||
lno[strlen(lno)-2] = '\0'; /* ignore ;" at the end */
|
lno[strlen(lno)-2] = '\0'; /* ignore ;" at the end */
|
||||||
|
@@ -748,6 +748,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1406,
|
||||||
/**/
|
/**/
|
||||||
1405,
|
1405,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user