From: Niels Provos Date: Tue, 24 Jun 2008 23:37:37 +0000 (+0000) Subject: close fd if evhttp_get_requestion_connection fails X-Git-Tag: release-2.0.1-alpha~253 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3dc717a38d07f89850b9ddfe5b46c3859392d40;p=libevent close fd if evhttp_get_requestion_connection fails svn:r867 --- diff --git a/http.c b/http.c index 6c230e6d..ded43c9e 100644 --- a/http.c +++ b/http.c @@ -2602,6 +2602,7 @@ evhttp_get_request(struct evhttp *http, evutil_socket_t fd, evcon = evhttp_get_request_connection(http, fd, sa, salen); if (evcon == NULL) { event_warn("%s: cannot get connection on %d", __func__, fd); + EVUTIL_CLOSESOCKET(fd); return; }