summaryrefslogtreecommitdiffstats
path: root/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'read.c')
-rw-r--r--read.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/read.c b/read.c
index 90642134..699b2c65 100644
--- a/read.c
+++ b/read.c
@@ -542,6 +542,7 @@ rerun:
if (mparse_open(curp, &fd, ln.buf + of) ==
MANDOCLEVEL_OK) {
mparse_readfd(curp, fd, ln.buf + of);
+ close(fd);
curp->file = save_file;
} else {
curp->file = save_file;
@@ -773,10 +774,6 @@ mparse_readfd(struct mparse *curp, int fd, const char *file)
#endif
free(blk.buf);
}
-
- if (fd != STDIN_FILENO && close(fd) == -1)
- perror(file);
-
return curp->file_status;
}