mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 11:53:00 -04:00
bug fix and potentital race condition from Alexander Drozdov
svn:r1025
This commit is contained in:
parent
f6eb1f816c
commit
ed7e0e77ed
5
event.c
5
event.c
@ -390,8 +390,13 @@ event_reinit(struct event_base *base)
|
||||
|
||||
/* prevent internal delete */
|
||||
if (base->sig.ev_signal_added) {
|
||||
/* we cannot call event_del here because the base has
|
||||
* not been reinitialized yet. */
|
||||
event_queue_remove(base, &base->sig.ev_signal,
|
||||
EVLIST_INSERTED);
|
||||
if (base->sig.ev_signal.ev_flags & EVLIST_ACTIVE)
|
||||
event_queue_remove(base, &base->sig.ev_signal,
|
||||
EVLIST_ACTIVE);
|
||||
base->sig.ev_signal_added = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user