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.
diff --git a/src/syntax.c b/src/syntax.c
index e466de8..d5c2e77 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -5668,6 +5668,8 @@
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 @@
}
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;