]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0476: pattern completion leaks memory on alloc failures v9.2.0476
authorglepnir <glephunter@gmail.com>
Tue, 12 May 2026 17:40:19 +0000 (17:40 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 12 May 2026 17:40:19 +0000 (17:40 +0000)
commit38237411e4e202a96b0efe41567505331114bfa8
tree668f9c755451d6a2913fe72f97c58be70f281053
parent78302b7b4aaa4449b21cc8b966b6baed63f7531e
patch 9.2.0476: pattern completion leaks memory on alloc failures

Problem:  copy_substring_from_pos() leaked on ga_grow() failures,
          expand_pattern_in_buf() leaked "match" on ga_grow() failure,
          fuzzy_match_str_with_pos() ignored ga_grow() failures
Solution: Route failures through cleanup paths, check ga_grow before
          writing to ga_data (glepnir)

closes: #20203

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