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

patch 9.0.0556: leaking memory with nested functions

Problem:    Leaking memory with nested functions.
Solution:   Free saved pointer.
This commit is contained in:
Bram Moolenaar
2022-09-23 13:27:57 +01:00
parent 20e58561ab
commit 86fb3f8b99
2 changed files with 3 additions and 0 deletions

View File

@@ -400,6 +400,7 @@ clear_evalarg(evalarg_T *evalarg, exarg_T *eap)
// need to keep it around. // need to keep it around.
--etga->ga_len; --etga->ga_len;
*eap->cmdlinep = ((char_u **)etga->ga_data)[etga->ga_len]; *eap->cmdlinep = ((char_u **)etga->ga_data)[etga->ga_len];
vim_free(evalarg->eval_tofree);
} }
else else
*eap->cmdlinep = evalarg->eval_tofree; *eap->cmdlinep = evalarg->eval_tofree;

View File

@@ -699,6 +699,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
556,
/**/ /**/
555, 555,
/**/ /**/