mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Check return value when using LEV_OPT_DEFERRED_ACCEPT. Found by coverity
This commit is contained in:
parent
9852107f37
commit
6487f63b79
@ -239,7 +239,10 @@ evconnlistener_new_bind(struct event_base *base, evconnlistener_cb cb,
|
||||
}
|
||||
|
||||
if (flags & LEV_OPT_DEFERRED_ACCEPT) {
|
||||
evutil_make_tcp_listen_socket_deferred(fd);
|
||||
if (evutil_make_tcp_listen_socket_deferred(fd) < 0) {
|
||||
evutil_closesocket(fd);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (sa) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user