Mercurial > vim
changeset 24687:0668fe755d2b v8.2.2882
patch 8.2.2882: Vim9: memory leak when lambda has an error
Commit: https://github.com/vim/vim/commit/15bbb8f4f38d25d491d7dff83ef0552e2d442d5d
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 24 15:45:29 2021 +0200
patch 8.2.2882: Vim9: memory leak when lambda has an error
Problem: Vim9: memory leak when lambda has an error.
Solution: Free the list of argument types on failure.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 24 May 2021 16:00:04 +0200 |
parents | b839c305dfa6 |
children | 56929100c771 |
files | src/userfunc.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/userfunc.c +++ b/src/userfunc.c @@ -1394,7 +1394,11 @@ errret: ga_clear_strings(&newlines); ga_clear_strings(&default_args); if (types_optional) + { ga_clear_strings(&argtypes); + if (fp != NULL) + vim_free(fp->uf_arg_types); + } vim_free(fp); vim_free(pt); if (evalarg != NULL && evalarg->eval_tofree == NULL)