Problem: Various memory leaks.
Solution: Avoid the leaks. (Ozaki Kiichi, closes #5803)
restore_dbg_stuff(&debug_saved);
msg_list = saved_msg_list;
+
+ // Cleanup if "cs_emsg_silent_list" remains.
+ if (cstack.cs_emsg_silent_list != NULL)
+ {
+ eslist_T *elem, *temp;
+
+ for (elem = cstack.cs_emsg_silent_list; elem != NULL; elem = temp)
+ {
+ temp = elem->next;
+ vim_free(elem);
+ }
+ }
#endif // FEAT_EVAL
/*
if (win_split((int)p_cwh, WSP_BOT) == FAIL)
{
beep_flush();
+ ga_clear(&winsizes);
return K_IGNORE;
}
cmdwin_type = get_cmdline_type();
if (bit < MENU_MODES) // just in case, avoid Coverity warning
{
if (menu->strings[bit] != NULL)
+ {
+ char_u *tofree = NULL;
+
status = dict_add_string(dict, "rhs",
*menu->strings[bit] == NUL
- ? vim_strsave((char_u *)"<Nop>")
- : str2special_save(menu->strings[bit], FALSE));
+ ? (char_u *)"<Nop>"
+ : (tofree = str2special_save(
+ menu->strings[bit], FALSE)));
+ vim_free(tofree);
+ }
if (status == OK)
status = dict_add_bool(dict, "noremenu",
menu->noremap[bit] == REMAP_NONE);
char_u *copy = vim_strnsave((char_u *)name, len);
semsg(msg, copy == NULL ? "NULL" : (char *)copy);
+ vim_free(copy);
}
/*
{
// Already loaded and no need to load again, return here.
*ret_sid = sid;
- return OK;
+ retval = OK;
+ goto theend;
}
#endif
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);
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);
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 399,
/**/
398,
/**/