]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0711: leak in ins_compl_infercase_gettext() in error case v9.2.0711
authorChristian Brabandt <cb@256bit.org>
Tue, 23 Jun 2026 20:16:49 +0000 (20:16 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 23 Jun 2026 20:16:49 +0000 (20:16 +0000)
Problem:  leak in ins_compl_infercase_gettext() in error case
          (Cheng)
Solution: free wca before returning.

closes: #20607

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

index c7186b9297d9ca68fc3f20f132f88e61ad14b2de..3b20d2a3c79a9ab9be3592b1563b0696d05562ad 100644 (file)
@@ -699,6 +699,7 @@ ins_compl_infercase_gettext(
            if (ga_grow(&gap, 10) == FAIL)
            {
                ga_clear(&gap);
+               vim_free(wca);
                return (char_u *)"[failed]";
            }
            p = (char_u *)gap.ga_data + gap.ga_len;
index 7433593c773dd250f1e44ce4f6a497bbff5d04e6..c3ae1b07d9bd54ce6846f2ab6c0c37e3c5ad7596 100644 (file)
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    711,
 /**/
     710,
 /**/