[or-cvs] r12369: fix an assert error on startup if we didn't already have the (tor/trunk/src/or)

arma at seul.org arma at seul.org
Sun Nov 4 01:26:00 UTC 2007


Author: arma
Date: 2007-11-03 21:26:00 -0400 (Sat, 03 Nov 2007)
New Revision: 12369

Modified:
   tor/trunk/src/or/networkstatus.c
Log:
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.


Modified: tor/trunk/src/or/networkstatus.c
===================================================================
--- tor/trunk/src/or/networkstatus.c	2007-11-04 00:15:42 UTC (rev 12368)
+++ tor/trunk/src/or/networkstatus.c	2007-11-04 01:26:00 UTC (rev 12369)
@@ -1278,6 +1278,7 @@
           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;



More information about the tor-commits mailing list