comparison src/userfunc.c @ 19685:d64f403289db v8.2.0399

patch 8.2.0399: various memory leaks Commit: https://github.com/vim/vim/commit/292b90d4fa11022661f449dd3efb73d5ac737313 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 18 15:23:16 2020 +0100 patch 8.2.0399: various memory leaks Problem: Various memory leaks. Solution: Avoid the leaks. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/5803)
author Bram Moolenaar <Bram@vim.org>
date Wed, 18 Mar 2020 15:30:04 +0100
parents aae19dd172c0
children 293a22b677a8
comparison
equal deleted inserted replaced
19684:0b7b0650000a 19685:d64f403289db
940 ga_clear_strings(&(fp->uf_args)); 940 ga_clear_strings(&(fp->uf_args));
941 ga_clear_strings(&(fp->uf_def_args)); 941 ga_clear_strings(&(fp->uf_def_args));
942 ga_clear_strings(&(fp->uf_lines)); 942 ga_clear_strings(&(fp->uf_lines));
943 VIM_CLEAR(fp->uf_name_exp); 943 VIM_CLEAR(fp->uf_name_exp);
944 VIM_CLEAR(fp->uf_arg_types); 944 VIM_CLEAR(fp->uf_arg_types);
945 VIM_CLEAR(fp->uf_def_arg_idx);
946 VIM_CLEAR(fp->uf_va_name);
945 ga_clear(&fp->uf_type_list); 947 ga_clear(&fp->uf_type_list);
946 #ifdef FEAT_PROFILE 948 #ifdef FEAT_PROFILE
947 VIM_CLEAR(fp->uf_tml_count); 949 VIM_CLEAR(fp->uf_tml_count);
948 VIM_CLEAR(fp->uf_tml_total); 950 VIM_CLEAR(fp->uf_tml_total);
949 VIM_CLEAR(fp->uf_tml_self); 951 VIM_CLEAR(fp->uf_tml_self);
3084 3086
3085 goto ret_free; 3087 goto ret_free;
3086 3088
3087 erret: 3089 erret:
3088 ga_clear_strings(&newargs); 3090 ga_clear_strings(&newargs);
3089 ga_clear_strings(&argtypes);
3090 ga_clear_strings(&default_args); 3091 ga_clear_strings(&default_args);
3091 errret_2: 3092 errret_2:
3092 ga_clear_strings(&newlines); 3093 ga_clear_strings(&newlines);
3093 ret_free: 3094 ret_free:
3095 ga_clear_strings(&argtypes);
3094 vim_free(skip_until); 3096 vim_free(skip_until);
3095 vim_free(line_to_free); 3097 vim_free(line_to_free);
3096 vim_free(fudi.fd_newkey); 3098 vim_free(fudi.fd_newkey);
3097 vim_free(name); 3099 vim_free(name);
3098 did_emsg |= saved_did_emsg; 3100 did_emsg |= saved_did_emsg;