aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-08-02 16:08:50 -0400
committerDavid Goulet <dgoulet@torproject.org>2022-08-02 16:08:50 -0400
commit0f9842a0d2018aef1d69f9cc66ae49e5e7fc2add (patch)
treedb2cf790059fbcda0999750d189aa3790d194f77
parentee20d74672dae079cb7edfc44e5ac33c7ed523f8 (diff)
parente69cf2340be05aaaa2d4df4085f236742696bf86 (diff)
downloadtor-0f9842a0d2018aef1d69f9cc66ae49e5e7fc2add.tar.gz
tor-0f9842a0d2018aef1d69f9cc66ae49e5e7fc2add.zip
Merge branch 'maint-0.4.6' into release-0.4.6
-rw-r--r--changes/ticket406045
-rw-r--r--src/core/or/connection_or.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/changes/ticket40604 b/changes/ticket40604
new file mode 100644
index 0000000000..ec24a46e66
--- /dev/null
+++ b/changes/ticket40604
@@ -0,0 +1,5 @@
+ o Major bugfixes (relay):
+ - Remove OR connections btrack subsystem entries when the connections
+ closes normally. Before this, we would only close it on error and thus
+ leaking memory for each normal OR connections. Fixes bug 40604; bugfix
+ on 0.4.0.1-alpha.
diff --git a/src/core/or/connection_or.c b/src/core/or/connection_or.c
index dd31638eb3..6d9f1c7572 100644
--- a/src/core/or/connection_or.c
+++ b/src/core/or/connection_or.c
@@ -805,6 +805,10 @@ connection_or_about_to_close(or_connection_t *or_conn)
} else if (!tor_digest_is_zero(or_conn->identity_digest)) {
connection_or_event_status(or_conn, OR_CONN_EVENT_CLOSED,
tls_error_to_orconn_end_reason(or_conn->tls_error));
+ } else {
+ /* Normal close, we notify of a done connection. */
+ connection_or_event_status(or_conn, OR_CONN_EVENT_CLOSED,
+ END_OR_CONN_REASON_DONE);
}
}