summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-11-04 01:26:00 +0000
committerRoger Dingledine <arma@torproject.org>2007-11-04 01:26:00 +0000
commit9ef72079aedc30869cbea600066ea641f0ca213b (patch)
tree70c11ce5b97cec597a7a869d2f0680da36bca802 /src
parente9af56cf2f3adc88e11280d2e6fafc3ce6d0f371 (diff)
downloadtor-9ef72079aedc30869cbea600066ea641f0ca213b.tar.gz
tor-9ef72079aedc30869cbea600066ea641f0ca213b.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/or/networkstatus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 57b4996c63..cacb1307c3 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -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;