patch 7.4.1406
Problem: Leaking memory in cs_print_tags_priv().
Solution: Free tbuf. (idea by Forrest Fleming)
diff --git a/src/if_cscope.c b/src/if_cscope.c
index c135fe5..b5ca614 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -2092,12 +2092,13 @@
continue;
(void)strcpy(tbuf, matches[idx]);
- if (strtok(tbuf, (const char *)"\t") == NULL)
+ if (strtok(tbuf, (const char *)"\t") == NULL
+ || (fname = strtok(NULL, (const char *)"\t")) == NULL
+ || (lno = strtok(NULL, (const char *)"\t")) == NULL)
+ {
+ vim_free(tbuf);
continue;
- if ((fname = strtok(NULL, (const char *)"\t")) == NULL)
- continue;
- if ((lno = strtok(NULL, (const char *)"\t")) == NULL)
- continue;
+ }
extra = strtok(NULL, (const char *)"\t");
lno[strlen(lno)-2] = '\0'; /* ignore ;" at the end */
diff --git a/src/version.c b/src/version.c
index 5696dfc..a04a948 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1406,
+/**/
1405,
/**/
1404,