aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2011-10-18 07:08:02 -0700
committerRobert Ransom <rransom.8774@gmail.com>2011-10-18 07:08:02 -0700
commit739c21e97b5c78ee76c7283993e7ca01f6d3beec (patch)
treee9fba441194de2cba0084e3f8516d89f1cdc88d3 /src/or
parent56180d169acb12302c65c1b5843f829cdb3aede2 (diff)
downloadtor-739c21e97b5c78ee76c7283993e7ca01f6d3beec.tar.gz
tor-739c21e97b5c78ee76c7283993e7ca01f6d3beec.zip
Free rend_data and intro_key when extra intro circs become general-purpose
Diffstat (limited to 'src/or')
-rw-r--r--src/or/rendservice.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 6ed9650fc1..0f5731912d 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1421,7 +1421,20 @@ rend_service_intro_has_opened(origin_circuit_t *circuit)
log_info(LD_CIRC|LD_REND, "We have just finished an introduction "
"circuit, but we already have enough. Redefining purpose to "
"general; leaving as internal.");
+
TO_CIRCUIT(circuit)->purpose = CIRCUIT_PURPOSE_C_GENERAL;
+
+ {
+ rend_data_t *rend_data = circuit->rend_data;
+ circuit->rend_data = NULL;
+ rend_data_free(rend_data);
+ }
+ {
+ crypto_pk_env_t *intro_key = circuit->intro_key;
+ circuit->intro_key = NULL;
+ crypto_free_pk_env(intro_key);
+ }
+
circuit_has_opened(circuit);
return;
}