mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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
This commit is contained in:
@@ -200,6 +200,7 @@ command_process_create_cell(cell_t *cell, connection_t *conn)
|
||||
circ->purpose = CIRCUIT_PURPOSE_OR;
|
||||
circ->state = CIRCUIT_STATE_ONIONSKIN_PENDING;
|
||||
if (cell->command == CELL_CREATE) {
|
||||
circ->onionskin = tor_malloc(ONIONSKIN_CHALLENGE_LEN);
|
||||
memcpy(circ->onionskin, cell->payload, ONIONSKIN_CHALLENGE_LEN);
|
||||
|
||||
/* hand it off to the cpuworkers, and then return */
|
||||
|
||||
Reference in New Issue
Block a user