fix an assert error on startup if we didn't already have the

consensus and certs cached in our datadirectory: we were
caching the consensus in consensus_waiting_for_certs but then
free'ing it right after.

more bugs remain here, i think.


svn:r12369
This commit is contained in:
Roger Dingledine
2007-11-04 01:26:00 +00:00
parent e9af56cf2f
commit 9ef72079ae
+1
View File
@@ -1278,6 +1278,7 @@ networkstatus_set_current_consensus(const char *consensus, int from_cache,
networkstatus_vote_free(consensus_waiting_for_certs);
tor_free(consensus_waiting_for_certs_body);
consensus_waiting_for_certs = c;
c = NULL; /* Prevent free. */
consensus_waiting_for_certs_body = tor_strdup(consensus);
consensus_waiting_for_certs_set_at = now;
consensus_waiting_for_certs_dl_failed = 0;