diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-22 15:28:55 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-22 15:28:55 +0100 |
commit | d7a96151e0c86e8d4f9162c919cf3ff400a893b6 (patch) | |
tree | 921e691c3598bd457668caf5318101334a98237c /src | |
parent | ca24e2cfcfd3f064ea1674886e3dcaa8254ad8d7 (diff) | |
download | vim-d7a96151e0c86e8d4f9162c919cf3ff400a893b6.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/syntax.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/syntax.c b/src/syntax.c index e466de898..d5c2e7712 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -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; diff --git a/src/version.c b/src/version.c index 592c77ca7..918bee46a 100644 --- 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, |