diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-08 19:35:21 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-08 19:35:21 +0200 |
commit | 6110e79a5872dd6c5529f909d1bd670e3325927b (patch) | |
tree | 1fb63ffbf024f240692cd439baa3c65e52d29c46 /src/userfunc.c | |
parent | 6b7a0a8c201bbace7e69fe0709f72b95092193df (diff) | |
download | vim-git-6110e79a5872dd6c5529f909d1bd670e3325927b.tar.gz |
patch 8.2.1160: Vim9: memory leak in allocated typesv8.2.1160
Problem: Vim9: memory leak in allocated types.
Solution: Free the type pointers.
Diffstat (limited to 'src/userfunc.c')
-rw-r--r-- | src/userfunc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/userfunc.c b/src/userfunc.c index 121079149..01c97dedd 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -1069,10 +1069,7 @@ func_clear_items(ufunc_T *fp) VIM_CLEAR(fp->uf_arg_types); VIM_CLEAR(fp->uf_def_arg_idx); VIM_CLEAR(fp->uf_va_name); - while (fp->uf_type_list.ga_len > 0) - vim_free(((type_T **)fp->uf_type_list.ga_data) - [--fp->uf_type_list.ga_len]); - ga_clear(&fp->uf_type_list); + clear_type_list(&fp->uf_type_list); #ifdef FEAT_LUA if (fp->uf_cb_free != NULL) |