changeset 30441:b1617545fcdf v9.0.0556

patch 9.0.0556: leaking memory with nested functions Commit: https://github.com/vim/vim/commit/86fb3f8b99d155fe6bcbb553b5596c3e9fd570a9 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 23 13:27:57 2022 +0100 patch 9.0.0556: leaking memory with nested functions Problem: Leaking memory with nested functions. Solution: Free saved pointer.
author Bram Moolenaar <Bram@vim.org>
date Fri, 23 Sep 2022 14:30:03 +0200
parents d03093a04b9a
children a357f581ca7b
files src/eval.c src/version.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -400,6 +400,7 @@ clear_evalarg(evalarg_T *evalarg, exarg_
 		    // need to keep it around.
 		    --etga->ga_len;
 		    *eap->cmdlinep = ((char_u **)etga->ga_data)[etga->ga_len];
+		    vim_free(evalarg->eval_tofree);
 		}
 		else
 		    *eap->cmdlinep = evalarg->eval_tofree;
--- a/src/version.c
+++ b/src/version.c
@@ -700,6 +700,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    556,
+/**/
     555,
 /**/
     554,