]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Shutdown libevent _after_ the subsystems.
authorNick Mathewson <nickm@torproject.org>
Wed, 29 May 2019 15:25:47 +0000 (11:25 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 29 May 2019 15:25:47 +0000 (11:25 -0400)
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.

src/app/main/shutdown.c

index e4dcaa132490de3392a9ac81d7be8287b455a8bf..cc0091a9abcc72c59a35f5fab1fb63da0a297bc6 100644 (file)
@@ -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);