From: Huihui Huang <625173@qq.com> Date: Sun, 29 Mar 2026 13:56:42 +0000 (+0000) Subject: patch 9.2.0268: memory leak in call_oc_method() X-Git-Tag: v9.2.0268^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30bac359dc50f7a1a710ddfa08d3f7e8849cb3dc;p=thirdparty%2Fvim.git patch 9.2.0268: memory leak in call_oc_method() Problem: memory leak in call_oc_method() Solution: Clean up argvars in the failure case (Huihui Huang) closes: #19828 Signed-off-by: Huihui Huang <625173@qq.com> Signed-off-by: Christian Brabandt --- diff --git a/src/version.c b/src/version.c index d2797c2373..82172b7499 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 */ +/**/ + 268, /**/ 267, /**/ diff --git a/src/vim9class.c b/src/vim9class.c index 11696b72b6..8edd022bd9 100644 --- a/src/vim9class.c +++ b/src/vim9class.c @@ -3099,7 +3099,11 @@ call_oc_method( char_u *argp = name_end; int ret = get_func_arguments(&argp, evalarg, 0, argvars, &argcount, FALSE); if (ret == FAIL) + { + while (--argcount >= 0) + clear_tv(&argvars[argcount]); return FAIL; + } funcexe_T funcexe; CLEAR_FIELD(funcexe);