summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-04-17 11:53:52 -0400
committerNick Mathewson <nickm@torproject.org>2013-04-17 11:53:52 -0400
commitcd2b508f4ec22e85104065058722293a951be200 (patch)
tree00d0fed3f768fc24483f2cff362705ca11f226ac /src/or/networkstatus.c
parent9630fb917f3549b3fcbd4a3885e0c47f4be9be36 (diff)
downloadtor-cd2b508f4ec22e85104065058722293a951be200.tar.gz
tor-cd2b508f4ec22e85104065058722293a951be200.zip
Don't leak a waiting-for-certs consensus when accepting it.
I believe this was introduced in 6bc071f765d2829249db52, which makes this a fix on 0.2.0.10-alpha. But my code archeology has not extended to actually testing that theory.
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 2553a74e50..b78fed3111 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -1893,11 +1893,12 @@ networkstatus_note_certs_arrived(void)
if (!waiting->consensus)
continue;
if (networkstatus_check_consensus_signature(waiting->consensus, 0)>=0) {
+ char *waiting_body = waiting->body;
if (!networkstatus_set_current_consensus(
- waiting->body,
+ waiting_body,
networkstatus_get_flavor_name(i),
NSSET_WAS_WAITING_FOR_CERTS)) {
- tor_free(waiting->body);
+ tor_free(waiting_body);
}
}
}