mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
No OOM in vim_strsave_escaped[_ext]()
This commit is contained in:
@@ -2485,8 +2485,6 @@ ins_compl_dictionaries (
|
||||
if (ctrl_x_mode == CTRL_X_WHOLE_LINE) {
|
||||
char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
|
||||
|
||||
if (pat_esc == NULL)
|
||||
goto theend;
|
||||
size_t len = STRLEN(pat_esc) + 10;
|
||||
ptr = xmalloc(len);
|
||||
vim_snprintf((char *)ptr, len, "^\\s*\\zs\\V%s", pat_esc);
|
||||
@@ -5253,8 +5251,6 @@ internal_format (
|
||||
*/
|
||||
saved_text = vim_strsave(get_cursor_pos_ptr());
|
||||
curwin->w_cursor.col = orig_col;
|
||||
if (saved_text == NULL)
|
||||
break; /* Can't do it, out of memory */
|
||||
saved_text[startcol] = NUL;
|
||||
|
||||
/* Backspace over characters that will move to the next line */
|
||||
|
Reference in New Issue
Block a user