Remove more OOM error handling code

From the functions:

 - ExpandBufnames
 - buf_modname()
 - do_autocmd_event()
 - ff_create_stack_element()
 - ff_get_visited_list()
 - ins_complete()
 - msg_show_console_dialog()
 - prt_find_resource()
 - vim_findfile_init()

TODO: refactor msg_show_console_dialog() to make sure it doesn't ever return
NULL.
This commit is contained in:
Felipe Oliveira Carvalho
2014-04-04 14:24:13 -03:00
committed by Thiago de Arruda
parent 3fcdb2ab29
commit 86279cefae
7 changed files with 21 additions and 58 deletions

View File

@@ -1877,12 +1877,6 @@ int ExpandBufnames(char_u *pat, int *num_file, char_u ***file, int options)
break;
if (round == 1) {
*file = (char_u **)alloc((unsigned)(count * sizeof(char_u *)));
if (*file == NULL) {
vim_regfree(prog);
if (patc != pat)
vim_free(patc);
return FAIL;
}
}
}
vim_regfree(prog);