changeset 24860:594edca79708 v8.2.2968

patch 8.2.2968: Vim9: memory leak Commit: https://github.com/vim/vim/commit/54656015d384a96ef814dfcf2a18e47f5ba3df14 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 9 20:50:46 2021 +0200 patch 8.2.2968: Vim9: memory leak Problem: Vim9: memory leak Solution: Unreference pt_outer of partial.
author Bram Moolenaar <Bram@vim.org>
date Wed, 09 Jun 2021 21:00:03 +0200
parents 9c2028b33471
children 97f000974cc2
files src/eval.c src/version.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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,