From 322abc030e53c7e84ca9f22a47b2965f262f5ffa Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 11 Dec 2017 11:33:54 -0500 Subject: On exit, free the event_base and set its pointer to NULL. When we didn't do this before, we'd have some still-reachable memory warnings, and we'd find ourselves crashing when we tried to reinitialize libevent. Part of 24581 (don't crash when restarting Tor in-process) --- src/or/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/or/main.c') diff --git a/src/or/main.c b/src/or/main.c index aae98dd8ab..bebe9fff44 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -3388,6 +3388,7 @@ tor_free_all(int postfork) if (!postfork) { release_lockfile(); } + tor_libevent_free_all(); /* Stuff in util.c and address.c*/ if (!postfork) { escaped(NULL); -- cgit v1.2.3-54-g00ecf