0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.1161: Vim9: using freed memory

Problem:    Vim9: using freed memory.
Solution:   Put pointer back in evalarg instead of freeing it.
This commit is contained in:
Bram Moolenaar
2020-07-08 22:01:49 +02:00
parent 6110e79a58
commit 8e2730a315
6 changed files with 67 additions and 33 deletions

View File

@@ -3113,6 +3113,8 @@ compile_lambda(char_u **arg, cctx_T *cctx)
// Compile it into instructions.
compile_def_function(ufunc, TRUE, cctx);
clear_evalarg(&evalarg, NULL);
if (ufunc->uf_def_status == UF_COMPILED)
return generate_FUNCREF(cctx, ufunc->uf_dfunc_idx);
return FAIL;