summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-05-05 22:40:56 +0200
committerBram Moolenaar <Bram@vim.org>2021-05-05 22:40:56 +0200
commitdc3e2e65c9dddcace4b24f0f364883d7ce448efb (patch)
tree4794eaf0f45bc11d65068d0333e7c50dad15ce07
parent5f7d4c049e934dbc8d2c3f2720797c10ee3c55c2 (diff)
patch 8.2.2835: Vim9: leaking memory in :cexprv8.2.2835
Problem: Vim9: leaking memory in :cexpr. Solution: Also free the command line copy.
-rw-r--r--src/version.c2
-rw-r--r--src/vim9compile.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/version.c b/src/version.c
index 101036f803..9b53528bf9 100644
--- 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,
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 607f651d90..ead193f38e 100644
--- 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;