From: Yasuhiro Matsumoto Date: Sat, 18 Jul 2026 14:30:50 +0000 (+0000) Subject: patch 9.2.0800: Memory leak in call_func() on alloc failure X-Git-Tag: v9.2.0800^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59271381f3a12e988aa1603eb3013f171db1594c;p=thirdparty%2Fvim.git patch 9.2.0800: Memory leak in call_func() on alloc failure Problem: Memory leak in call_func() on alloc failure Solution: goto theend for the cleanup (Yasuhiro Matsumoto). The early return bypassed the theend cleanup, leaking the parsed generic function type arguments. Use goto theend. related: #20668 related: #20745 Signed-off-by: Yasuhiro Matsumoto Signed-off-by: Christian Brabandt --- diff --git a/src/userfunc.c b/src/userfunc.c index de1a8e84e0..4dddf621d5 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -3997,7 +3997,7 @@ call_func( // could be changed or deleted in the called function. name = len > 0 ? vim_strnsave(funcname, len) : vim_strsave(funcname); if (name == NULL) - return ret; + goto theend; fname = fname_trans_sid(name, fname_buf, &tofree, &error); } diff --git a/src/version.c b/src/version.c index 0c85088f49..801fd41797 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 800, /**/ 799, /**/