]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1098: leaking memory with completing multi lines v9.1.1098
authorglepnir <glephunter@gmail.com>
Mon, 10 Feb 2025 20:16:32 +0000 (21:16 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 10 Feb 2025 20:16:32 +0000 (21:16 +0100)
Problem:  leaking memory with completing multi lines
          (after v9.1.1086)
Solution: free allocated memory (glepnir)

closes: #16605

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/insexpand.c
src/version.c

index 9fdc1c0ffb94eda92b7e4dba49ac7e209f81faf8..a0f552e9542bc18016eec0a80251aaa6279810e8 100644 (file)
@@ -4416,7 +4416,11 @@ ins_compl_delete(void)
     if ((int)curwin->w_cursor.col > col)
     {
        if (stop_arrow() == FAIL)
+       {
+           if (remaining)
+               VIM_CLEAR(remaining);
            return;
+       }
        backspace_until_column(col);
        compl_ins_end_col = curwin->w_cursor.col;
     }
index 0a254e5cf54fdac6e9e5a01b1c19349fced00c00..12cdfce5f6213aa9d27f7a136a598f69559b60df 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1098,
 /**/
     1097,
 /**/