tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit e7907f15f9b7685fbdd24939a7266235a066f8a0
parent c8a27d89b26394a0e802820fe891ef75787499ab
Author: Nick Mathewson <nickm@torproject.org>
Date:   Fri, 19 Jan 2018 09:45:10 -0500

Don't call Libevent's event_base_free() on NULL.

It doesn't crash, but it produces a warning.

Fixes bug 24933; bugfix on 322abc030e53c7e84ca9f22a47b2965f2. Bug
not in any released Tor.

Diffstat:
Msrc/common/compat_libevent.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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; }