]> granicus.if.org Git - vim/commitdiff
patch 8.0.0214: leaking memory when syntax cluster id is unknown v8.0.0214
authorBram Moolenaar <Bram@vim.org>
Sun, 22 Jan 2017 14:28:55 +0000 (15:28 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 22 Jan 2017 14:28:55 +0000 (15:28 +0100)
Problem:    Leaking memory when syntax cluster id is unknown. (Coverity)
Solution:   Free the memory.

src/syntax.c
src/version.c

index e466de8985d43598f8296e50a36abc7bdc1910dc..d5c2e7712800d80b519c99349196252565fdbf31 100644 (file)
@@ -5668,6 +5668,8 @@ syn_cmd_cluster(exarg_T *eap, int syncing UNUSED)
            if (scl_id >= 0)
                syn_combine_list(&SYN_CLSTR(curwin->w_s)[scl_id].scl_list,
                             &clstr_list, list_op);
+           else
+               vim_free(clstr_list);
            got_clstr = TRUE;
        }
 
@@ -6034,7 +6036,8 @@ get_id_list(
                }
                if (count != 0)
                {
-                   EMSG2(_("E408: %s must be first in contains list"), name + 1);
+                   EMSG2(_("E408: %s must be first in contains list"),
+                                                                    name + 1);
                    failed = TRUE;
                    vim_free(name);
                    break;
index 592c77ca73b9f702e20732c15c930545b2385256..918bee46add85a0fba90652fef849cd0f5580607 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    214,
 /**/
     213,
 /**/