aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-12-09 17:43:43 +0000
committerRoger Dingledine <arma@torproject.org>2007-12-09 17:43:43 +0000
commitbe337eb0adf3f85397eaeabdfdf95a605f70970e (patch)
treec92de23171442c650f9ac2d12472901c74b06bef /src/or/routerlist.c
parent6dfd47467eb7628c1d87e0b9235880564b31d85c (diff)
downloadtor-be337eb0adf3f85397eaeabdfdf95a605f70970e.tar
tor-be337eb0adf3f85397eaeabdfdf95a605f70970e.tar.gz
fix a memory leak in authority_certs_fetch_missing() every time
we try to call it but don't have enough dir info. svn:r12743
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 47c780830..141db022a 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -311,13 +311,16 @@ authority_cert_get_by_digests(const char *id_digest,
void
authority_certs_fetch_missing(networkstatus_vote_t *status, time_t now)
{
- digestmap_t *pending = digestmap_new();
- smartlist_t *missing_digests = smartlist_create();
+ digestmap_t *pending;
+ smartlist_t *missing_digests;
char *resource = NULL;
if (should_delay_dir_fetches(get_options()))
return;
+ pending = digestmap_new();
+ missing_digests = smartlist_create();
+
list_pending_downloads(pending, DIR_PURPOSE_FETCH_CERTIFICATE, "fp/");
if (status) {
SMARTLIST_FOREACH(status->voters, networkstatus_voter_info_t *, voter,