Mercurial > vim
comparison src/syntax.c @ 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 | 16fc46021e51 |
children | 715836a72361 |
comparison
equal
deleted
inserted
replaced
10647:9588a81b6d2c | 10648:4f3decf25b7d |
---|---|
5666 break; | 5666 break; |
5667 } | 5667 } |
5668 if (scl_id >= 0) | 5668 if (scl_id >= 0) |
5669 syn_combine_list(&SYN_CLSTR(curwin->w_s)[scl_id].scl_list, | 5669 syn_combine_list(&SYN_CLSTR(curwin->w_s)[scl_id].scl_list, |
5670 &clstr_list, list_op); | 5670 &clstr_list, list_op); |
5671 else | |
5672 vim_free(clstr_list); | |
5671 got_clstr = TRUE; | 5673 got_clstr = TRUE; |
5672 } | 5674 } |
5673 | 5675 |
5674 if (got_clstr) | 5676 if (got_clstr) |
5675 { | 5677 { |
6032 vim_free(name); | 6034 vim_free(name); |
6033 break; | 6035 break; |
6034 } | 6036 } |
6035 if (count != 0) | 6037 if (count != 0) |
6036 { | 6038 { |
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); | |
6038 failed = TRUE; | 6041 failed = TRUE; |
6039 vim_free(name); | 6042 vim_free(name); |
6040 break; | 6043 break; |
6041 } | 6044 } |
6042 if (name[1] == 'A') | 6045 if (name[1] == 'A') |