mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
make evhttp_send() safe against terminated connections, too
This commit is contained in:
parent
5c8b446eba
commit
01ea0c5c28
5
http.c
5
http.c
@ -1935,6 +1935,11 @@ evhttp_send(struct evhttp_request *req, struct evbuffer *databuf)
|
||||
{
|
||||
struct evhttp_connection *evcon = req->evcon;
|
||||
|
||||
if (evcon == NULL) {
|
||||
evhttp_request_free(req);
|
||||
return;
|
||||
}
|
||||
|
||||
assert(TAILQ_FIRST(&evcon->requests) == req);
|
||||
|
||||
/* we expect no more calls form the user on this request */
|
||||
|
Loading…
x
Reference in New Issue
Block a user