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 <cb@256bit.org>
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 268,
/**/
267,
/**/
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);