mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 11:53:00 -04:00
Fix a fd leak in event_reinit()
We were supposed to be closing the ev_signal_pair sockets.
This commit is contained in:
parent
6e41cdc16b
commit
3f18ad1b5f
4
event.c
4
event.c
@ -820,6 +820,10 @@ event_reinit(struct event_base *base)
|
||||
if (base->sig.ev_signal.ev_flags & EVLIST_ACTIVE)
|
||||
event_queue_remove(base, &base->sig.ev_signal,
|
||||
EVLIST_ACTIVE);
|
||||
if (base->sig.ev_signal_pair[0] != -1)
|
||||
EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[0]);
|
||||
if (base->sig.ev_signal_pair[1] != -1)
|
||||
EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[1]);
|
||||
base->sig.ev_signal_added = 0;
|
||||
}
|
||||
if (base->th_notify_fd[0] != -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user