Skip to content

Commit d7a9615

Browse files
committed
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.
1 parent ca24e2c commit d7a9615

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/syntax.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5668,6 +5668,8 @@ syn_cmd_cluster(exarg_T *eap, int syncing UNUSED)
56685668
if (scl_id >= 0)
56695669
syn_combine_list(&SYN_CLSTR(curwin->w_s)[scl_id].scl_list,
56705670
&clstr_list, list_op);
5671+
else
5672+
vim_free(clstr_list);
56715673
got_clstr = TRUE;
56725674
}
56735675

@@ -6034,7 +6036,8 @@ get_id_list(
60346036
}
60356037
if (count != 0)
60366038
{
6037-
EMSG2(_("E408: %s must be first in contains list"), name + 1);
6039+
EMSG2(_("E408: %s must be first in contains list"),
6040+
name + 1);
60386041
failed = TRUE;
60396042
vim_free(name);
60406043
break;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
214,
767769
/**/
768770
213,
769771
/**/

0 commit comments

Comments
 (0)