diff options
author | Roger Dingledine <arma@torproject.org> | 2007-12-09 17:43:43 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-12-09 17:43:43 +0000 |
commit | be337eb0adf3f85397eaeabdfdf95a605f70970e (patch) | |
tree | c92de23171442c650f9ac2d12472901c74b06bef /src/or/routerlist.c | |
parent | 6dfd47467eb7628c1d87e0b9235880564b31d85c (diff) | |
download | tor-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.c | 7 |
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, |