aboutsummaryrefslogtreecommitdiff
path: root/src/app/main/shutdown.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-05-29 11:25:47 -0400
committerNick Mathewson <nickm@torproject.org>2019-05-29 11:25:47 -0400
commitba9b0319b00692038e5d4aa2eff7cf5d6947e659 (patch)
treed31dbde879159cb57e9a590db4d83fcba87a65d0 /src/app/main/shutdown.c
parent24a2352d56d807320c45fcdd8c74435bda4302c2 (diff)
downloadtor-ba9b0319b00692038e5d4aa2eff7cf5d6947e659.tar.gz
tor-ba9b0319b00692038e5d4aa2eff7cf5d6947e659.zip
Shutdown libevent _after_ the subsystems.
This is necessary since shutting down libevent frees some pointer that the subsystems want to free themselves. A longer term solution will be to turn the evloop module into a subsystem itself, but for now it is best to do the minimal fix. Fixes bug 30629; bugfix on 0.4.1.1-alpha.
Diffstat (limited to 'src/app/main/shutdown.c')
-rw-r--r--src/app/main/shutdown.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/app/main/shutdown.c b/src/app/main/shutdown.c
index e4dcaa1324..cc0091a9ab 100644
--- a/src/app/main/shutdown.c
+++ b/src/app/main/shutdown.c
@@ -157,10 +157,11 @@ tor_free_all(int postfork)
if (!postfork) {
release_lockfile();
}
- tor_libevent_free_all();
subsystems_shutdown();
+ tor_libevent_free_all();
+
/* Stuff in util.c and address.c*/
if (!postfork) {
esc_router_info(NULL);