changeset 8234:dc72f4a463e4 v7.4.1410

commit https://github.com/vim/vim/commit/42dd7aee41ffcc5afdbf9bb83d70e7123261cada Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 23 22:50:12 2016 +0100 patch 7.4.1410 Problem: Leaking memory in cscope interface. Solution: Free memory when no tab is found. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Tue, 23 Feb 2016 23:00:05 +0100
parents 0b7d02552c6e
children 5e85d7642085
files src/if_cscope.c src/version.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -2062,7 +2062,10 @@ cs_print_tags_priv(char **matches, char 
     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);
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1410,
+/**/
     1409,
 /**/
     1408,