commit | d293981d2b76b40013143fe2302b910585e50808 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Thu Dec 30 17:09:05 2021 +0000 |
committer | Bram Moolenaar <Bram@vim.org> | Thu Dec 30 17:09:05 2021 +0000 |
tree | 87e99a889ddfb0344376b4553a14963de88a25cb | |
parent | 94f3192b03ed27474db80b4d3a409e107140738b [diff] [blame] |
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".
diff --git a/src/vim9compile.c b/src/vim9compile.c index 8882bfe..272368e 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c
@@ -889,6 +889,7 @@ semsg(_(e_text_found_after_str_str), eap->cmdidx == CMD_def ? "enddef" : "endfunction", eap->nextcmd); r = FAIL; + func_ptr_unref(ufunc); goto theend; }