fix a seg fault on exit for clients; and fix a comment.

svn:r6969
This commit is contained in:
Roger Dingledine 2006-08-03 04:22:25 +00:00
parent b2c42635f0
commit 3152d44c3a

View File

@ -91,8 +91,7 @@ typedef struct cached_resolve_t {
uint32_t magic; uint32_t magic;
char address[MAX_ADDRESSLEN]; /**< The hostname to be resolved. */ char address[MAX_ADDRESSLEN]; /**< The hostname to be resolved. */
uint32_t addr; /**< IPv4 addr for <b>address</b>. */ uint32_t addr; /**< IPv4 addr for <b>address</b>. */
uint8_t state; /**< 0 is pending; 1 means answer is valid; 2 means resolve uint8_t state; /**< Is this cached entry pending/done/valid/failed? */
* failed. */
time_t expire; /**< Remove items from cache after this time. */ time_t expire; /**< Remove items from cache after this time. */
uint32_t ttl; /**< What TTL did the nameserver tell us? */ uint32_t ttl; /**< What TTL did the nameserver tell us? */
pending_connection_t *pending_connections; pending_connection_t *pending_connections;
@ -264,6 +263,7 @@ dns_free_all(void)
_free_cached_resolve(item); _free_cached_resolve(item);
} }
HT_CLEAR(cache_map, &cache_root); HT_CLEAR(cache_map, &cache_root);
if (cached_resolve_pqueue)
smartlist_free(cached_resolve_pqueue); smartlist_free(cached_resolve_pqueue);
cached_resolve_pqueue = NULL; cached_resolve_pqueue = NULL;
} }