This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/quic-latest by this push:
new 4462afc Fix memory leaks in QUICIncomingFrameBuffer
4462afc is described below
commit 4462afc9ff7cf62006db56d0093a4bc8b5c9eeae
Author: Masakazu Kitajo <[email protected]>
AuthorDate: Mon Feb 25 14:54:31 2019 +0900
Fix memory leaks in QUICIncomingFrameBuffer
---
iocore/net/quic/QUICIncomingFrameBuffer.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/iocore/net/quic/QUICIncomingFrameBuffer.cc
b/iocore/net/quic/QUICIncomingFrameBuffer.cc
index 1af3651..154563f 100644
--- a/iocore/net/quic/QUICIncomingFrameBuffer.cc
+++ b/iocore/net/quic/QUICIncomingFrameBuffer.cc
@@ -95,16 +95,19 @@ QUICIncomingStreamFrameBuffer::insert(const QUICFrame
*frame)
QUICConnectionErrorUPtr err = this->_check_and_set_fin_flag(offset, len,
stream_frame->has_fin_flag());
if (err != nullptr) {
+ delete frame;
return err;
}
// Ignore empty stream frame except pure fin stream frame
if (len == 0 && !stream_frame->has_fin_flag()) {
+ delete frame;
return nullptr;
}
if (this->_recv_offset > offset) {
// dup frame;
+ delete frame;
return nullptr;
} else if (this->_recv_offset == offset) {
this->_recv_offset = offset + len;
@@ -227,11 +230,13 @@ QUICIncomingCryptoFrameBuffer::insert(const QUICFrame
*frame)
// Ignore empty stream frame
if (len == 0) {
+ delete frame;
return nullptr;
}
if (this->_recv_offset > offset) {
// dup frame;
+ delete frame;
return nullptr;
} else if (this->_recv_offset == offset) {
this->_recv_offset = offset + len;