瀏覽代碼

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.
Nick Mathewson 6 年之前
父節點
當前提交
ba9b0319b0
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/app/main/shutdown.c

+ 2 - 1
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);