summaryrefslogtreecommitdiff
path: root/src/misc2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc2.c')
-rw-r--r--src/misc2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 6b9ffe151..96813a484 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -4533,8 +4533,9 @@ vim_findfile_init(path, filename, stopdirs, level, free_visited, find_what,
* This is needed if the parameter path is fully qualified.
*/
search_ctx->ffsc_start_dir = vim_strsave(search_ctx->ffsc_fix_path);
- if (search_ctx->ffsc_start_dir)
- search_ctx->ffsc_fix_path[0] = NUL;
+ if (search_ctx->ffsc_start_dir == NULL)
+ goto error_return;
+ search_ctx->ffsc_fix_path[0] = NUL;
}
/* create an absolute path */