]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.2125: Vim9: leaking memory v8.2.2125
authorBram Moolenaar <Bram@vim.org>
Thu, 10 Dec 2020 19:21:24 +0000 (20:21 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 10 Dec 2020 19:21:24 +0000 (20:21 +0100)
Problem:    Vim9: leaking memory.
Solution:   Free the saved 'cpo' value.

src/scriptfile.c
src/version.c

index bf4cbc0ea619e78d5d723c85effb882130690c68..aebd98dc771b54dd02d7ed0f651fd1baead4f5a8 100644 (file)
@@ -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;
index ee6be8a7681b516d9d8581c3cecff11989ebb4dd..0a98c78ad344c7bc8b4e52bf857df71177d94285 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2125,
 /**/
     2124,
 /**/