fix(coverity/352829): correctly free memory in f_call

This function was not freeing allocated memory that it owns when calling
functions from lua.
This commit is contained in:
Thomas Vigouroux
2022-06-23 09:16:05 +02:00
parent 3a4fa22bad
commit 7add9ea0e7

View File

@@ -780,6 +780,9 @@ static void f_call(typval_T *argvars, typval_T *rettv, FunPtr fptr)
if (argvars[2].v_type != VAR_UNKNOWN) {
if (argvars[2].v_type != VAR_DICT) {
emsg(_(e_dictreq));
if (owned) {
func_unref(func);
}
return;
}
selfdict = argvars[2].vval.v_dict;