diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-03-27 15:05:28 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-03-27 15:05:28 +0000 |
commit | 02acee891c9898e510bb21e4a6b88e44ff4a13f9 (patch) | |
tree | a0410637ae1688d18327205b21c7aa529e147fc6 /src/or/policies.c | |
parent | 03078f7f7a9aec4aa94b05f71d92458ec865b9a0 (diff) | |
download | tor-02acee891c9898e510bb21e4a6b88e44ff4a13f9.tar.gz tor-02acee891c9898e510bb21e4a6b88e44ff4a13f9.zip |
r19089@catbus: nickm | 2008-03-27 11:05:23 -0400
Free some static hashtables and the log mutex on exit. Backport candidate.
svn:r14212
Diffstat (limited to 'src/or/policies.c')
-rw-r--r-- | src/or/policies.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/policies.c b/src/or/policies.c index 31b7917e9c..2e66a00323 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -446,7 +446,7 @@ typedef struct policy_map_ent_t { addr_policy_t *policy; } policy_map_ent_t; -static HT_HEAD(policy_map, policy_map_ent_t) policy_root; +static HT_HEAD(policy_map, policy_map_ent_t) policy_root = HT_INITIALIZER(); /** Return true iff a and b are equal. */ static INLINE int @@ -923,5 +923,9 @@ policies_free_all(void) authdir_reject_policy = NULL; addr_policy_list_free(authdir_invalid_policy); authdir_invalid_policy = NULL; + + if (!HT_EMPTY(&policy_root)) + log_warn(LD_MM, "Still had some address policies cached at shutdown."); + HT_CLEAR(policy_map, &policy_root); } |