0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.0399: various memory leaks

Problem:    Various memory leaks.
Solution:   Avoid the leaks. (Ozaki Kiichi, closes #5803)
This commit is contained in:
Bram Moolenaar
2020-03-18 15:23:16 +01:00
parent a21df1db3c
commit 292b90d4fa
7 changed files with 29 additions and 4 deletions

View File

@@ -942,6 +942,8 @@ func_clear_items(ufunc_T *fp)
ga_clear_strings(&(fp->uf_lines));
VIM_CLEAR(fp->uf_name_exp);
VIM_CLEAR(fp->uf_arg_types);
VIM_CLEAR(fp->uf_def_arg_idx);
VIM_CLEAR(fp->uf_va_name);
ga_clear(&fp->uf_type_list);
#ifdef FEAT_PROFILE
VIM_CLEAR(fp->uf_tml_count);
@@ -3086,11 +3088,11 @@ ex_function(exarg_T *eap)
erret:
ga_clear_strings(&newargs);
ga_clear_strings(&argtypes);
ga_clear_strings(&default_args);
errret_2:
ga_clear_strings(&newlines);
ret_free:
ga_clear_strings(&argtypes);
vim_free(skip_until);
vim_free(line_to_free);
vim_free(fudi.fd_newkey);