mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.3951: Vim9: memory leak when text after a nested function
Problem: Vim9: memory leak when text after a nested function. Solution: Free the function if text is found after "enddef".
This commit is contained in:
@@ -889,6 +889,7 @@ compile_nested_function(exarg_T *eap, cctx_T *cctx, char_u **line_to_free)
|
||||
semsg(_(e_text_found_after_str_str),
|
||||
eap->cmdidx == CMD_def ? "enddef" : "endfunction", eap->nextcmd);
|
||||
r = FAIL;
|
||||
func_ptr_unref(ufunc);
|
||||
goto theend;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user