ywkaras commented on code in PR #9552:
URL: https://github.com/apache/trafficserver/pull/9552#discussion_r1147039220
##########
proxy/ProtocolProbeSessionAccept.cc:
##########
@@ -170,8 +170,14 @@ ProtocolProbeSessionAccept::mainEvent(int event, void
*data)
ink_assert(data);
VIO *vio;
- NetVConnection *netvc = static_cast<NetVConnection *>(data);
- ProtocolProbeTrampoline *probe = new ProtocolProbeTrampoline(this,
netvc->mutex, nullptr, nullptr);
+ NetVConnection *netvc = static_cast<NetVConnection *>(data);
+ ProtocolProbeTrampoline *probe;
+ UnixNetVConnection *unix_netvc = dynamic_cast<UnixNetVConnection *>(netvc);
+ if (unix_netvc != nullptr && unix_netvc->read.vio.get_writer() != nullptr)
{
+ probe = new ProtocolProbeTrampoline(this, netvc->mutex,
unix_netvc->read.vio.get_writer(), unix_netvc->read.vio.get_reader());
+ } else {
+ probe = new ProtocolProbeTrampoline(this, netvc->mutex, nullptr,
nullptr);
+ }
Review Comment:
`probe` looks like it was leaked, even before your change.
--
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]