Browse Source

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

Roger Dingledine 16 years ago
parent
commit
9ef72079ae
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/or/networkstatus.c

+ 1 - 0
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;