From: Huihui Huang <625173@qq.com> Date: Wed, 25 Mar 2026 19:51:42 +0000 (+0000) Subject: patch 9.2.0246: memory leak in globpath() X-Git-Tag: v9.2.0246^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=418400075ac94eb4d1caaad1cd5251d994bf2a91;p=thirdparty%2Fvim.git patch 9.2.0246: memory leak in globpath() Problem: memory leak in globpath() Solution: Free the individual allocated strings when ga_grow() fails (Huihui Huang) closes: #19817 Signed-off-by: Huihui Huang <625173@qq.com> Signed-off-by: Christian Brabandt --- diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 4916465e8a..63757179a5 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -4219,6 +4219,11 @@ globpath( ++ga->ga_len; } } + else + { + FreeWild(num_p, p); + p = NULL; + } vim_free(p); } } diff --git a/src/version.c b/src/version.c index 9edef9b900..b38010c071 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 246, /**/ 245, /**/