Mercurial > vim
comparison src/eval.c @ 16013:93b08b92a049 v8.1.1012
patch 8.1.1012: memory leak with E461
commit https://github.com/vim/vim/commit/ab89d7ab89a1dd7e40cc28df96c71c11b5ab9089
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 17 14:43:31 2019 +0100
patch 8.1.1012: memory leak with E461
Problem: Memory leak with E461.
Solution: Clear the typeval. (Dominique Pelle, closes https://github.com/vim/vim/issues/4111)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 Mar 2019 14:45:06 +0100 |
parents | 9cc42db77a54 |
children | 89fb86821b4a |
comparison
equal
deleted
inserted
replaced
16012:9a9fad1ad197 | 16013:93b08b92a049 |
---|---|
2136 // Can't add "v:" or "a:" variable. | 2136 // Can't add "v:" or "a:" variable. |
2137 if (lp->ll_dict == &vimvardict | 2137 if (lp->ll_dict == &vimvardict |
2138 || &lp->ll_dict->dv_hashtab == get_funccal_args_ht()) | 2138 || &lp->ll_dict->dv_hashtab == get_funccal_args_ht()) |
2139 { | 2139 { |
2140 semsg(_(e_illvar), name); | 2140 semsg(_(e_illvar), name); |
2141 clear_tv(&var1); | |
2141 return NULL; | 2142 return NULL; |
2142 } | 2143 } |
2143 | 2144 |
2144 // Key does not exist in dict: may need to add it. | 2145 // Key does not exist in dict: may need to add it. |
2145 if (*p == '[' || *p == '.' || unlet) | 2146 if (*p == '[' || *p == '.' || unlet) |