changeset 24592:ae2eb2c496ed v8.2.2835

patch 8.2.2835: Vim9: leaking memory in :cexpr Commit: https://github.com/vim/vim/commit/dc3e2e65c9dddcace4b24f0f364883d7ce448efb Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 5 22:40:56 2021 +0200 patch 8.2.2835: Vim9: leaking memory in :cexpr Problem: Vim9: leaking memory in :cexpr. Solution: Also free the command line copy.
author Bram Moolenaar <Bram@vim.org>
date Wed, 05 May 2021 22:45:04 +0200
parents 760d7c2f6bf2
children 3786de85c165
files src/version.c src/vim9compile.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2835,
+/**/
     2834,
 /**/
     2833,
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -9641,6 +9641,7 @@ delete_instr(isn_T *isn)
 	    break;
 
 	case ISN_CEXPR_CORE:
+	    vim_free(isn->isn_arg.cexpr.cexpr_ref->cer_cmdline);
 	    vim_free(isn->isn_arg.cexpr.cexpr_ref);
 	    break;