Mercurial > vim
comparison src/userfunc.c @ 21218:1f4d0375f947 v8.2.1160
patch 8.2.1160: Vim9: memory leak in allocated types
Commit: https://github.com/vim/vim/commit/6110e79a5872dd6c5529f909d1bd670e3325927b
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 8 19:35:21 2020 +0200
patch 8.2.1160: Vim9: memory leak in allocated types
Problem: Vim9: memory leak in allocated types.
Solution: Free the type pointers.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 08 Jul 2020 19:45:04 +0200 |
parents | b0baa80cb53f |
children | ad13736a1783 |
comparison
equal
deleted
inserted
replaced
21217:d9d839c4d070 | 21218:1f4d0375f947 |
---|---|
1067 ga_clear_strings(&(fp->uf_lines)); | 1067 ga_clear_strings(&(fp->uf_lines)); |
1068 VIM_CLEAR(fp->uf_name_exp); | 1068 VIM_CLEAR(fp->uf_name_exp); |
1069 VIM_CLEAR(fp->uf_arg_types); | 1069 VIM_CLEAR(fp->uf_arg_types); |
1070 VIM_CLEAR(fp->uf_def_arg_idx); | 1070 VIM_CLEAR(fp->uf_def_arg_idx); |
1071 VIM_CLEAR(fp->uf_va_name); | 1071 VIM_CLEAR(fp->uf_va_name); |
1072 while (fp->uf_type_list.ga_len > 0) | 1072 clear_type_list(&fp->uf_type_list); |
1073 vim_free(((type_T **)fp->uf_type_list.ga_data) | |
1074 [--fp->uf_type_list.ga_len]); | |
1075 ga_clear(&fp->uf_type_list); | |
1076 | 1073 |
1077 #ifdef FEAT_LUA | 1074 #ifdef FEAT_LUA |
1078 if (fp->uf_cb_free != NULL) | 1075 if (fp->uf_cb_free != NULL) |
1079 { | 1076 { |
1080 fp->uf_cb_free(fp->uf_cb_state); | 1077 fp->uf_cb_free(fp->uf_cb_state); |