mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix an unlikely but possible error case for http connections
Found by coverity
This commit is contained in:
parent
69b5c64704
commit
f22049e359
6
http.c
6
http.c
@ -1419,6 +1419,12 @@ evhttp_connection_cb(struct bufferevent *bufev, short what, void *arg)
|
||||
return;
|
||||
}
|
||||
|
||||
if (evcon->fd == -1) {
|
||||
event_debug(("%s: bufferevent_getfd returned -1",
|
||||
__func__));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Check if the connection completed */
|
||||
if (getsockopt(evcon->fd, SOL_SOCKET, SO_ERROR, (void*)&error,
|
||||
&errsz) == -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user