diff src/eval.c @ 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 3c8bd1d392d1
children f67773e26cfa
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)