summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/cgi.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-08-18 00:44:38 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-08-18 00:44:38 +0000
commit93927f14103267849fe0f8b096ab6002f1686c9c (patch)
tree36defdf2a4121ce4b736f3e2c494e9e9770000f7 /usr.bin/mandoc/cgi.c
parent8714776712898565c47325073f399b04f1c49601 (diff)
fix an fd leak
ok schwarze@
Diffstat (limited to 'usr.bin/mandoc/cgi.c')
-rw-r--r--usr.bin/mandoc/cgi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/cgi.c b/usr.bin/mandoc/cgi.c
index 1fc545ecf99..2bb1f6a8981 100644
--- a/usr.bin/mandoc/cgi.c
+++ b/usr.bin/mandoc/cgi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgi.c,v 1.76 2016/08/10 18:39:04 schwarze Exp $ */
+/* $OpenBSD: cgi.c,v 1.77 2016/08/18 00:44:37 jsg Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@usta.de>
@@ -336,6 +336,7 @@ resp_copy(const char *filename)
fflush(stdout);
while ((sz = read(fd, buf, sizeof(buf))) > 0)
write(STDOUT_FILENO, buf, sz);
+ close(fd);
}
}