]> granicus.if.org Git - vim/commitdiff
patch 8.2.0177: memory leak in get_tags() v8.2.0177
authorBram Moolenaar <Bram@vim.org>
Wed, 29 Jan 2020 21:38:45 +0000 (22:38 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 29 Jan 2020 21:38:45 +0000 (22:38 +0100)
Problem:    Memory leak in get_tags().
Solution:   Free matches when finding a pseudo-tag line. (Dominique Pelle,
            closes #5553)

src/tag.c
src/version.c

index 4c6dadcf21eb9b49788195106eddb7e7665770dd..cfc300e4659c7628f83189d6674bbbec1d29457f 100644 (file)
--- a/src/tag.c
+++ b/src/tag.c
@@ -3980,7 +3980,10 @@ get_tags(list_T *list, char_u *pat, char_u *buf_fname)
 
            // Skip pseudo-tag lines.
            if (STRNCMP(tp.tagname, "!_TAG_", 6) == 0)
+           {
+               vim_free(matches[i]);
                continue;
+           }
 
            if ((dict = dict_alloc()) == NULL)
                ret = FAIL;
index fbb2ca554e75d33c6386f4b8b430c1b920d820bb..e6935a289bad35eaadfd8b28d86dbe9bee98e503 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    177,
 /**/
     176,
 /**/