mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user