aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-12-11 11:33:54 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-11 11:52:19 -0500
commit322abc030e53c7e84ca9f22a47b2965f262f5ffa (patch)
tree12d96003ef5fe66aeaa20654a4c5af79aca67c3b /src/or/main.c
parentea929e8456d065a25d7eb5e2e0e41e0f303ebe9d (diff)
downloadtor-322abc030e53c7e84ca9f22a47b2965f262f5ffa.tar.gz
tor-322abc030e53c7e84ca9f22a47b2965f262f5ffa.zip
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)
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c1
1 files changed, 1 insertions, 0 deletions
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);