changeset 10648:4f3decf25b7d v8.0.0214

patch 8.0.0214: leaking memory when syntax cluster id is unknown commit https://github.com/vim/vim/commit/d7a96151e0c86e8d4f9162c919cf3ff400a893b6 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 22 15:28:55 2017 +0100 patch 8.0.0214: leaking memory when syntax cluster id is unknown Problem: Leaking memory when syntax cluster id is unknown. (Coverity) Solution: Free the memory.
author Christian Brabandt <cb@256bit.org>
date Sun, 22 Jan 2017 15:30:05 +0100
parents 9588a81b6d2c
children c677a1fe7993
files src/syntax.c src/version.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -5668,6 +5668,8 @@ syn_cmd_cluster(exarg_T *eap, int syncin
 	    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;
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    214,
+/**/
     213,
 /**/
     212,