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

@@ -3545,10 +3545,8 @@ int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp)
for (l = repl; *l; ++l)
if (vim_strchr(ESCAPE_CHARS, *l) != NULL) {
l = vim_strsave_escaped(repl, ESCAPE_CHARS);
if (l != NULL) {
free(repl);
repl = l;
}
free(repl);
repl = l;
break;
}
}
@@ -3559,10 +3557,8 @@ int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp)
char_u *l;
l = vim_strsave_escaped(repl, (char_u *)"!");
if (l != NULL) {
free(repl);
repl = l;
}
free(repl);
repl = l;
}
p = repl_cmdline(eap, p, srclen, repl, cmdlinep);