mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.1862: vim9: memory leak when compiling lambda fails
Problem: vim9: memory leak when compiling lambda fails. Solution: Call clear_evalarg().
This commit is contained in:
@@ -2692,7 +2692,10 @@ compile_lambda(char_u **arg, cctx_T *cctx)
|
||||
|
||||
// Get the funcref in "rettv".
|
||||
if (get_lambda_tv(arg, &rettv, &evalarg) != OK)
|
||||
{
|
||||
clear_evalarg(&evalarg, NULL);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
ufunc = rettv.vval.v_partial->pt_func;
|
||||
++ufunc->uf_refcount;
|
||||
|
Reference in New Issue
Block a user