From 42dd7aee41ffcc5afdbf9bb83d70e7123261cada Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 23 Feb 2016 22:50:12 +0100 Subject: [PATCH] patch 7.4.1410 Problem: Leaking memory in cscope interface. Solution: Free memory when no tab is found. (Christian Brabandt) --- src/if_cscope.c | 3 +++ src/version.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/if_cscope.c b/src/if_cscope.c index b5ca6148b..2f75390b9 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -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); diff --git a/src/version.c b/src/version.c index f1edf3647..ce155faf3 100644 --- a/src/version.c +++ b/src/version.c @@ -748,6 +748,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1410, /**/ 1409, /**/ -- 2.50.1