You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2017/10/11 07:50:58 UTC
[trafficserver] 25/25: Call the QUICFrame destructor before freeing
into the ClassAllocator
This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch quic-05
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit ff2d8a76925672d28a93d6135f1f25b6acef1c44
Author: Bryan Call <bc...@apache.org>
AuthorDate: Thu Oct 5 13:21:29 2017 -0700
Call the QUICFrame destructor before freeing into the ClassAllocator
(cherry picked from commit 6df84c9fb9a4ba936bd747e8509e56ea32d4f903)
---
iocore/net/quic/QUICFrame.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/iocore/net/quic/QUICFrame.h b/iocore/net/quic/QUICFrame.h
index 0b1e554..772d65a 100644
--- a/iocore/net/quic/QUICFrame.h
+++ b/iocore/net/quic/QUICFrame.h
@@ -40,6 +40,7 @@ public:
virtual void store(uint8_t *buf, size_t *len) const = 0;
virtual void reset(const uint8_t *buf, size_t len);
static QUICFrameType type(const uint8_t *buf);
+ virtual ~QUICFrame() {}
LINK(QUICFrame, link);
@@ -182,7 +183,7 @@ public:
QUICAckFrame() : QUICFrame() {}
QUICAckFrame(const uint8_t *buf, size_t len);
QUICAckFrame(QUICPacketNumber largest_acknowledged, uint16_t ack_delay, uint64_t first_ack_block_length);
- ~QUICAckFrame();
+ virtual ~QUICAckFrame();
virtual void reset(const uint8_t *buf, size_t len) override;
virtual QUICFrameType type() const override;
virtual size_t size() const override;
@@ -486,6 +487,7 @@ public:
static void
delete_ack_frame(QUICFrame *frame)
{
+ frame->~QUICFrame();
quicAckFrameAllocator.free(static_cast<QUICAckFrame *>(frame));
}
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.