0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2866: Vim9: memory leak when using inline function

Problem:    Vim9: memory leak when using inline function.
Solution:   Remember what strings to free.
This commit is contained in:
Bram Moolenaar
2021-05-18 15:09:18 +02:00
parent d87c21a918
commit ecb664501d
4 changed files with 21 additions and 8 deletions

View File

@@ -1881,7 +1881,9 @@ typedef struct {
// Used to collect lines while parsing them, so that they can be
// concatenated later. Used when "eval_ga.ga_itemsize" is not zero.
// "eval_ga.ga_data" is a list of pointers to lines.
// "eval_freega" list pointers that need to be freed after concatenating.
garray_T eval_ga;
garray_T eval_freega;
// pointer to the last line obtained with getsourceline()
char_u *eval_tofree;