]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
fix an assert error on startup if we didn't already have the
authorRoger Dingledine <arma@torproject.org>
Sun, 4 Nov 2007 01:26:00 +0000 (01:26 +0000)
committerRoger Dingledine <arma@torproject.org>
Sun, 4 Nov 2007 01:26:00 +0000 (01:26 +0000)
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

src/or/networkstatus.c

index 57b4996c6395e2a0f44ec9e98e1efaeceff55e6b..cacb1307c341c9ba5bc09cc80650b9ca1b9ef9c8 100644 (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;