]> granicus.if.org Git - vim/commitdiff
patch 7.4.1410 v7.4.1410
authorBram Moolenaar <Bram@vim.org>
Tue, 23 Feb 2016 21:50:12 +0000 (22:50 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 23 Feb 2016 21:50:12 +0000 (22:50 +0100)
Problem:    Leaking memory in cscope interface.
Solution:   Free memory when no tab is found. (Christian Brabandt)

src/if_cscope.c
src/version.c

index b5ca6148b9599622ad30824be8527f245a528022..2f75390b9ae5f2015b24c924a5a5226499feaf05 100644 (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);
index f1edf36477502e272e4acadea51dd13c029e6fff..ce155faf35da173764fec86df7e554301c17ab05 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1410,
 /**/
     1409,
 /**/