summaryrefslogtreecommitdiff
path: root/src/common/compat_libevent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/compat_libevent.c')
-rw-r--r--src/common/compat_libevent.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/compat_libevent.c b/src/common/compat_libevent.c
index b5e9cc9332..735385557c 100644
--- a/src/common/compat_libevent.c
+++ b/src/common/compat_libevent.c
@@ -243,7 +243,8 @@ tor_init_libevent_rng(void)
void
tor_libevent_free_all(void)
{
- event_base_free(the_event_base);
+ if (the_event_base)
+ event_base_free(the_event_base);
the_event_base = NULL;
}