maskit commented on code in PR #9346:
URL: https://github.com/apache/trafficserver/pull/9346#discussion_r1099388377
##########
proxy/http3/Http3Session.cc:
##########
@@ -38,8 +38,13 @@ HQSession::HQSession(NetVConnection *vc) : ProxySession(vc)
HQSession::~HQSession()
{
- for (HQTransaction *t = this->_transaction_list.head; t; t =
static_cast<HQTransaction *>(t->link.next)) {
- delete t;
+ // Transactions should be deleted first before HQSesson gets deleted.
+ // Delete remaining transactions just to prevent leaks.
+ HQTransaction *t = this->_transaction_list.head;
+ while (t) {
+ ink_assert(t);
+ auto x = t;
Review Comment:
I realized we can't simply do `t->link.next` because it's already deleted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]