diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-12-12 02:07:59 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-12-12 02:07:59 -0500 |
commit | 0c1b3070cfec670190636d74f97c2aaf0e521bdb (patch) | |
tree | ba893e6987f7b429510cec38a1cb6aaf0dc13793 /src/or/dns.c | |
parent | 79f72d0ef6cc3ce7cc92146ed0f0bdc7a4acad1a (diff) | |
download | tor-0c1b3070cfec670190636d74f97c2aaf0e521bdb.tar.gz tor-0c1b3070cfec670190636d74f97c2aaf0e521bdb.zip |
Now that FOO_free(NULL) always works, remove checks before calling it.
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 8951780931..963039df44 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -366,8 +366,7 @@ dns_free_all(void) _free_cached_resolve(item); } HT_CLEAR(cache_map, &cache_root); - if (cached_resolve_pqueue) - smartlist_free(cached_resolve_pqueue); + smartlist_free(cached_resolve_pqueue); cached_resolve_pqueue = NULL; tor_free(resolv_conf_fname); } @@ -1644,10 +1643,9 @@ dns_seems_to_be_broken(void) void dns_reset_correctness_checks(void) { - if (dns_wildcard_response_count) { - strmap_free(dns_wildcard_response_count, _tor_free); - dns_wildcard_response_count = NULL; - } + strmap_free(dns_wildcard_response_count, _tor_free); + dns_wildcard_response_count = NULL; + n_wildcard_requests = 0; if (dns_wildcard_list) { |