No OOM in home_replace_save()

This commit is contained in:
Felipe Oliveira Carvalho
2014-05-30 23:53:03 -03:00
parent cca66742eb
commit a26a1697c7
4 changed files with 18 additions and 27 deletions

View File

@@ -1908,7 +1908,7 @@ static char_u *fname_match(regprog_T *prog, char_u *name)
else {
/* Replace $(HOME) with '~' and try matching again. */
p = home_replace_save(NULL, name);
if (p != NULL && vim_regexec(&regmatch, p, (colnr_T)0))
if (vim_regexec(&regmatch, p, (colnr_T)0))
match = name;
free(p);
}