diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2021-07-03 06:03:52 +0000 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-07-30 12:57:30 -0400 |
commit | 66f975e4e6a7f991b4f49cb6c74e6b405f901969 (patch) | |
tree | 7928d761612ceb52aa1fd5c6625d2e7674d34b90 /src/core | |
parent | 4d8c6d570145ebad50183586ff0669820ad98822 (diff) | |
download | tor-66f975e4e6a7f991b4f49cb6c74e6b405f901969.tar.gz tor-66f975e4e6a7f991b4f49cb6c74e6b405f901969.zip |
Prop#324: Free congestion control object on circ and cpath
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/or/circuitlist.c | 3 | ||||
-rw-r--r-- | src/core/or/crypt_path.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/core/or/circuitlist.c b/src/core/or/circuitlist.c index 46be358dec..35d810c660 100644 --- a/src/core/or/circuitlist.c +++ b/src/core/or/circuitlist.c @@ -100,6 +100,7 @@ #include "lib/compress/compress_zlib.h" #include "lib/compress/compress_zstd.h" #include "lib/buf/buffers.h" +#include "core/or/congestion_control_common.h" #include "core/or/ocirc_event.h" @@ -1143,6 +1144,8 @@ circuit_free_(circuit_t *circ) * hs identifier is freed. */ hs_circ_cleanup_on_free(circ); + congestion_control_free(circ->ccontrol); + if (CIRCUIT_IS_ORIGIN(circ)) { origin_circuit_t *ocirc = TO_ORIGIN_CIRCUIT(circ); mem = ocirc; diff --git a/src/core/or/crypt_path.c b/src/core/or/crypt_path.c index 29356d7c2a..7673bc306f 100644 --- a/src/core/or/crypt_path.c +++ b/src/core/or/crypt_path.c @@ -27,6 +27,7 @@ #include "core/or/circuitbuild.h" #include "core/or/circuitlist.h" #include "core/or/extendinfo.h" +#include "core/or/congestion_control_common.h" #include "lib/crypt_ops/crypto_dh.h" #include "lib/crypt_ops/crypto_util.h" @@ -165,6 +166,7 @@ cpath_free(crypt_path_t *victim) onion_handshake_state_release(&victim->handshake_state); crypto_dh_free(victim->rend_dh_handshake_state); extend_info_free(victim->extend_info); + congestion_control_free(victim->ccontrol); memwipe(victim, 0xBB, sizeof(crypt_path_t)); /* poison memory */ tor_free(victim); |