summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-08-18 09:02:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-08-18 09:02:34 +0000
commit77517926723f6ebca20f5b22e648a619216bd012 (patch)
tree6632bf3dfd44df9b7d94aabbda382494e038df19
parent82084a7d25acdbc823a8a52ae0e4b9fb266553f0 (diff)
downloadmandoc-77517926723f6ebca20f5b22e648a619216bd012.tar.gz
fix an fd leak; patch from jsg@
-rw-r--r--cgi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cgi.c b/cgi.c
index 00b3c526..3ac06d90 100644
--- a/cgi.c
+++ b/cgi.c
@@ -338,6 +338,7 @@ resp_copy(const char *filename)
fflush(stdout);
while ((sz = read(fd, buf, sizeof(buf))) > 0)
write(STDOUT_FILENO, buf, sz);
+ close(fd);
}
}