0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.1.2107: various memory leaks reported by asan

Problem:    Various memory leaks reported by asan.
Solution:   Free the memory. (Ozaki Kiichi, closes #5003)
This commit is contained in:
Bram Moolenaar
2019-10-01 17:02:16 +02:00
parent b4367b7fb6
commit 8617348e21
11 changed files with 46 additions and 7 deletions

View File

@@ -2914,9 +2914,17 @@ eval_lambda(
semsg(_(e_missingparen), "lambda");
}
clear_tv(rettv);
return FAIL;
ret = FAIL;
}
return call_func_rettv(arg, rettv, evaluate, NULL, &base);
else
ret = call_func_rettv(arg, rettv, evaluate, NULL, &base);
// Clear the funcref afterwards, so that deleting it while
// evaluating the arguments is possible (see test55).
if (evaluate)
clear_tv(&base);
return ret;
}
/*