Set 'routerlist' global to NULL before freeing it.

There is other code that uses this value, and some of it is
apparently reachable from inside router_dir_info_changed(), which
routerlist_free() apparently calls.  (ouch!)  This is a minimal fix
to try to resolve the issue without causing other problems.

Fixes bug 31003. I'm calling this a bugfix on 0.1.2.2-alpha, where
the call to router_dir_info_changed() was added to routerlist_free().
This commit is contained in:
Nick Mathewson
2019-07-19 09:49:52 -04:00
parent 1dd9527897
commit a9379d6750
2 changed files with 10 additions and 6 deletions
+4
View File
@@ -0,0 +1,4 @@
o Minor bugfixes (crash on exit):
- Avoid a set of possible code paths that could use try to use freed memory
in routerlist_free() while Tor was exiting. Fixes bug 31003; bugfix on
0.1.2.2-alpha.