tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 66f975e4e6a7f991b4f49cb6c74e6b405f901969
parent 4d8c6d570145ebad50183586ff0669820ad98822
Author: Mike Perry <mikeperry-git@torproject.org>
Date:   Sat,  3 Jul 2021 06:03:52 +0000

Prop#324: Free congestion control object on circ and cpath

Diffstat:
Msrc/core/or/circuitlist.c | 3+++
Msrc/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 @@ -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 @@ -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);