No OOM in vim_strsave_escaped[_ext]()

This commit is contained in:
Felipe Oliveira Carvalho
2014-05-30 22:46:26 -03:00
parent f7e64c3c5f
commit 8234f2839f
10 changed files with 31 additions and 61 deletions

View File

@@ -18603,8 +18603,6 @@ int store_session_globals(FILE *fd)
* CR into \n and \r. */
p = vim_strsave_escaped(get_tv_string(&this_var->di_tv),
(char_u *)"\\\"\n\r");
if (p == NULL) /* out of memory */
break;
for (t = p; *t != NUL; ++t)
if (*t == '\n')
*t = 'n';