]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0809: getframelayout() uses wrong function to free lists v9.2.0809
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Sun, 19 Jul 2026 16:13:29 +0000 (16:13 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 19 Jul 2026 16:16:06 +0000 (16:16 +0000)
Problem:  getframelayout() uses wrong function to free lists on alloc
          failure.
Solution: Use list_free() on alloc failure (Yasuhiro Matsumoto).

get_framelayout() released a list_alloc()'d list with vim_free() when
list_append_list() failed, leaving a dangling pointer in the list
garbage-collection chain. Use list_free() so it is unlinked.

related: #20668
related: #20743

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/evalwindow.c
src/version.c

index f913980404d084cd6d76a71baafc93ba942d4213..9c56954b8b73e6e445853198820f75cfd425f860 100644 (file)
@@ -284,7 +284,7 @@ get_framelayout(frame_T *fr, list_T *l, int outer)
            return;
        if (list_append_list(l, fr_list) == FAIL)
        {
-           vim_free(fr_list);
+           list_free(fr_list);
            return;
        }
     }
@@ -309,7 +309,7 @@ get_framelayout(frame_T *fr, list_T *l, int outer)
            return;
        if (list_append_list(fr_list, win_list) == FAIL)
        {
-           vim_free(win_list);
+           list_free(win_list);
            return;
        }
 
index 3196d57cb9a4049cc99e4a2d655344f4072c0049..aa3f5b3fbd441eaf3310423a38b346191cebc62a 100644 (file)
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    809,
 /**/
     808,
 /**/