From: Huihui Huang <625173@qq.com> Date: Wed, 25 Feb 2026 20:10:07 +0000 (+0000) Subject: patch 9.2.0056: memory leak in ex_substitute X-Git-Tag: v9.2.0056^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a239a1905ea26eeb8f39604ab98ff374b2e0cd5;p=thirdparty%2Fvim.git patch 9.2.0056: memory leak in ex_substitute Problem: memory leak in ex_substitute Solution: Free the variable (Huihui Huang) fixes: #19501 closes: #19506 Signed-off-by: Huihui Huang <625173@qq.com> Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- diff --git a/src/ex_cmds.c b/src/ex_cmds.c index b56ee268b1..08ff731606 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -4130,8 +4130,11 @@ ex_substitute(exarg_T *eap) vim_free(old_sub); old_sub = vim_strsave(sub); if (old_sub == NULL) + { // out of memory + vim_free(sub); return; + } } } } diff --git a/src/version.c b/src/version.c index 40e00fc2bf..af8e5e13ed 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 */ +/**/ + 56, /**/ 55, /**/