[or-cvs] r12743: fix a memory leak in authority_certs_fetch_missing() every t (tor/trunk/src/or)
arma at seul.org
arma at seul.org
Sun Dec 9 17:43:43 UTC 2007
Author: arma
Date: 2007-12-09 12:43:43 -0500 (Sun, 09 Dec 2007)
New Revision: 12743
Modified:
tor/trunk/src/or/routerlist.c
Log:
fix a memory leak in authority_certs_fetch_missing() every time
we try to call it but don't have enough dir info.
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2007-12-09 17:06:28 UTC (rev 12742)
+++ tor/trunk/src/or/routerlist.c 2007-12-09 17:43:43 UTC (rev 12743)
@@ -311,13 +311,16 @@
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,
More information about the tor-commits
mailing list