aboutsummaryrefslogtreecommitdiff
path: root/src/or/cpuworker.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-10-29 19:13:48 +0000
committerRoger Dingledine <arma@torproject.org>2005-10-29 19:13:48 +0000
commit44b3f3060a863a9297fdbe722bd7bf8c00e70653 (patch)
tree788a754468f090ce105ccdd897774d3a0c1703fe /src/or/cpuworker.c
parentbf2be9abd75c2057e2f8f75c0480c2699c6299a5 (diff)
downloadtor-44b3f3060a863a9297fdbe722bd7bf8c00e70653.tar
tor-44b3f3060a863a9297fdbe722bd7bf8c00e70653.tar.gz
make circ->onionskin a pointer, not a static array. moria2 was using
125000 circuit_t's after it had been up for a few weeks, which translates to 20+ megs of wasted space. svn:r5333
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r--src/or/cpuworker.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index bc31faaf8..d5f2e4599 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -428,6 +428,7 @@ assign_to_cpuworker(connection_t *cpuworker, uint8_t question_type,
if (question_type == CPUWORKER_TASK_ONION) {
circ = task;
+ tor_assert(circ->onionskin);
if (num_cpuworkers_busy == num_cpuworkers) {
debug(LD_OR,"No idle cpuworkers. Queuing.");
@@ -453,6 +454,7 @@ assign_to_cpuworker(connection_t *cpuworker, uint8_t question_type,
connection_write_to_buf((char*)&question_type, 1, cpuworker);
connection_write_to_buf(tag, sizeof(tag), cpuworker);
connection_write_to_buf(circ->onionskin, ONIONSKIN_CHALLENGE_LEN, cpuworker);
+ tor_free(circ->onionskin);
}
return 0;
}