]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0810: add_llist_tags() uses wrong function to free dict v9.2.0810
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Sun, 19 Jul 2026 16:17:11 +0000 (16:17 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 19 Jul 2026 16:17:11 +0000 (16:17 +0000)
Problem:  add_llist_tags() uses wrong function to free dict on alloc
          failure
Solution: Use dict_unref() (Yasuhiro Matsumoto).

add_llist_tags() released a dict_alloc()'d dict with vim_free() when
list_append_dict() failed, leaving a dangling pointer in the dict
garbage-collection chain. Use dict_unref().

related: #20668
closes:  #20743

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

index cd068043d4a1fa96070d57a4f420bcbb5877dc57..96afc699b43e0f9810466efa3bc7aa9efcd60e07 100644 (file)
--- a/src/tag.c
+++ b/src/tag.c
@@ -1270,7 +1270,7 @@ add_llist_tags(
            continue;
        if (list_append_dict(list, dict) == FAIL)
        {
-           vim_free(dict);
+           dict_unref(dict);
            continue;
        }
 
index aa3f5b3fbd441eaf3310423a38b346191cebc62a..cf0d47a529254706baa9d936f21b8c0f6d023c65 100644 (file)
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    810,
 /**/
     809,
 /**/