summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-06-09 20:50:46 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-09 20:50:46 +0200
commit54656015d384a96ef814dfcf2a18e47f5ba3df14 (patch)
tree75cfce11f04347ad483b409083524177925eeaaa
parentc04f2a4cd40f32120b7a94fdea7bfa62e8640041 (diff)
downloadvim-git-54656015d384a96ef814dfcf2a18e47f5ba3df14.tar.gz
patch 8.2.2968: Vim9: memory leakv8.2.2968
Problem: Vim9: memory leak Solution: Unreference pt_outer of partial.
-rw-r--r--src/eval.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 46d8ca3a8..b6bee5af5 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -4301,6 +4301,9 @@ partial_free(partial_T *pt)
else
func_ptr_unref(pt->pt_func);
+ // "out_up" is no longer used, decrement refcount on partial that owns it.
+ partial_unref(pt->pt_outer.out_up_partial);
+
// Decrease the reference count for the context of a closure. If down
// to the minimum it may be time to free it.
if (pt->pt_funcstack != NULL)
diff --git a/src/version.c b/src/version.c
index 77b4ed08b..d03113602 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 */
/**/
+ 2968,
+/**/
2967,
/**/
2966,