diff options
author | KunMing Xie <qqzz014@gmail.com> | 2018-02-20 06:41:25 +0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-02-19 23:41:25 +0100 |
commit | e177c186e40e96b70ccdb92f90b6184ab58890a1 (patch) | |
tree | 7acd6e0da80049c40cf6e41591aa6dbef7d8f8b9 | |
parent | 4b81f627c6c031f286fec404bf42235847713181 (diff) | |
download | rneovim-e177c186e40e96b70ccdb92f90b6184ab58890a1.tar.gz rneovim-e177c186e40e96b70ccdb92f90b6184ab58890a1.tar.bz2 rneovim-e177c186e40e96b70ccdb92f90b6184ab58890a1.zip |
vim-patch:8.0.0214 (#8010)
vim-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.
https://github.com/vim/vim/commit/d7a96151e0c86e8d4f9162c919cf3ff400a893b6
-rw-r--r-- | src/nvim/syntax.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 0a7f703461..c3bc009f6a 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -4968,6 +4968,8 @@ static void syn_cmd_cluster(exarg_T *eap, int syncing) if (scl_id >= 0) { syn_combine_list(&SYN_CLSTR(curwin->w_s)[scl_id].scl_list, &clstr_list, list_op); + } else { + xfree(clstr_list); } got_clstr = true; } @@ -5276,8 +5278,9 @@ get_id_list ( break; } if (count != 0) { - EMSG2(_("E408: %s must be first in contains list"), name + 1); - failed = TRUE; + EMSG2(_("E408: %s must be first in contains list"), + name + 1); + failed = true; xfree(name); break; } |