artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80c8813
)
fix an fd leak if socket connection fails; from Carlin Bingham
author
jsg
<jsg@openbsd.org>
Thu, 8 Oct 2015 09:40:32 +0000
(09:40 +0000)
committer
jsg
<jsg@openbsd.org>
Thu, 8 Oct 2015 09:40:32 +0000
(09:40 +0000)
ok reyk@
usr.sbin/httpd/server_fcgi.c
patch
|
blob
|
history
diff --git
a/usr.sbin/httpd/server_fcgi.c
b/usr.sbin/httpd/server_fcgi.c
index
9d4d84a
..
0211a0d
100644
(file)
--- a/
usr.sbin/httpd/server_fcgi.c
+++ b/
usr.sbin/httpd/server_fcgi.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: server_fcgi.c,v 1.6
5 2015/10/08 09:32:13
jsg Exp $ */
+/* $OpenBSD: server_fcgi.c,v 1.6
6 2015/10/08 09:40:32
jsg Exp $ */
/*
* Copyright (c) 2014 Florian Obser <florian@openbsd.org>
@@
-399,6
+399,8
@@
server_fcgi(struct httpd *env, struct client *clt)
free(script);
if (errstr == NULL)
errstr = strerror(errno);
+ if (fd != -1 && clt->clt_fd != fd)
+ close(fd);
server_abort_http(clt, 500, errstr);
return (-1);
}