mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Don't crash when closing a connection before initializing libevent
Fixes bug 25981; bugfix on 96c5ac338a
. Bug not in any released
version of Tor.
This commit is contained in:
parent
17236a5842
commit
8b1380cbd0
@ -1676,6 +1676,11 @@ static mainloop_event_t *postloop_cleanup_ev=NULL;
|
|||||||
void
|
void
|
||||||
mainloop_schedule_postloop_cleanup(void)
|
mainloop_schedule_postloop_cleanup(void)
|
||||||
{
|
{
|
||||||
|
if (PREDICT_UNLIKELY(postloop_cleanup_ev == NULL)) {
|
||||||
|
// (It's possible that we can get here if we decide to close a connection
|
||||||
|
// in the earliest stages of our configuration, before we create events.)
|
||||||
|
return;
|
||||||
|
}
|
||||||
mainloop_event_activate(postloop_cleanup_ev);
|
mainloop_event_activate(postloop_cleanup_ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user