summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/fts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fts.c b/lib/fts.c
index 439826cfd..69e52ded4 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -670,7 +670,7 @@ fts_children(sp, instr)
return (sp->fts_child = fts_build(sp, instr));
if ((fd = open(".", O_RDONLY, 0)) < 0)
- return (NULL);
+ return (sp->fts_child = NULL);
sp->fts_child = fts_build(sp, instr);
if (fchdir(fd)) {
(void)close(fd);