mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 05:48:51 -04:00
close fd if evhttp_get_requestion_connection fails
svn:r867
This commit is contained in:
parent
24580e2b58
commit
c3dc717a38
1
http.c
1
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);
|
evcon = evhttp_get_request_connection(http, fd, sa, salen);
|
||||||
if (evcon == NULL) {
|
if (evcon == NULL) {
|
||||||
event_warn("%s: cannot get connection on %d", __func__, fd);
|
event_warn("%s: cannot get connection on %d", __func__, fd);
|
||||||
|
EVUTIL_CLOSESOCKET(fd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user