changeset 23158:59635213999a v8.2.2125

patch 8.2.2125: Vim9: leaking memory Commit: https://github.com/vim/vim/commit/8f1bf2ef785e48a4ca08e014b7713fdee2824631 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 10 20:21:24 2020 +0100 patch 8.2.2125: Vim9: leaking memory Problem: Vim9: leaking memory. Solution: Free the saved 'cpo' value.
author Bram Moolenaar <Bram@vim.org>
date Thu, 10 Dec 2020 20:30:04 +0100
parents 4dcb8c79c910
children de81343419b4
files src/scriptfile.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/scriptfile.c
+++ b/src/scriptfile.c
@@ -1492,7 +1492,7 @@ almosttheend:
     if (si->sn_save_cpo != NULL)
     {
 	set_option_value((char_u *)"cpo", 0L, si->sn_save_cpo, 0);
-	si->sn_save_cpo = NULL;
+	CLEAR_POINTER(si->sn_save_cpo);
     }
 
     current_sctx = save_current_sctx;
--- 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 */
 /**/
+    2125,
+/**/
     2124,
 /**/
     2123,