From: Bram Moolenaar Date: Wed, 5 May 2021 20:40:56 +0000 (+0200) Subject: patch 8.2.2835: Vim9: leaking memory in :cexpr X-Git-Tag: v8.2.2835 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc3e2e65c9dddcace4b24f0f364883d7ce448efb;p=vim patch 8.2.2835: Vim9: leaking memory in :cexpr Problem: Vim9: leaking memory in :cexpr. Solution: Also free the command line copy. --- diff --git a/src/version.c b/src/version.c index 101036f80..9b53528bf 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2835, /**/ 2834, /**/ diff --git a/src/vim9compile.c b/src/vim9compile.c index 607f651d9..ead193f38 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;