Index: net/quic/quic_packet_generator.cc |
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc |
index eed8ec7d84d62b14f59761158c65795494400146..ea50719f0a29a5edeb931baeeb5659c0da0c5ea5 100644 |
--- a/net/quic/quic_packet_generator.cc |
+++ b/net/quic/quic_packet_generator.cc |
@@ -57,7 +57,9 @@ QuicPacketGenerator::~QuicPacketGenerator() { |
for (QuicFrame& frame : queued_control_frames_) { |
switch (frame.type) { |
case PADDING_FRAME: |
- delete frame.padding_frame; |
+ case MTU_DISCOVERY_FRAME: |
+ case PING_FRAME: |
+ case BLOCKED_FRAME: |
break; |
case STREAM_FRAME: |
delete frame.stream_frame; |
@@ -65,9 +67,6 @@ QuicPacketGenerator::~QuicPacketGenerator() { |
case ACK_FRAME: |
delete frame.ack_frame; |
break; |
- case MTU_DISCOVERY_FRAME: |
- delete frame.mtu_discovery_frame; |
- break; |
case RST_STREAM_FRAME: |
delete frame.rst_stream_frame; |
break; |
@@ -80,15 +79,9 @@ QuicPacketGenerator::~QuicPacketGenerator() { |
case WINDOW_UPDATE_FRAME: |
delete frame.window_update_frame; |
break; |
- case BLOCKED_FRAME: |
- delete frame.blocked_frame; |
- break; |
case STOP_WAITING_FRAME: |
delete frame.stop_waiting_frame; |
break; |
- case PING_FRAME: |
- delete frame.ping_frame; |
- break; |
case NUM_FRAME_TYPES: |
DCHECK(false) << "Cannot delete type: " << frame.type; |
} |
@@ -250,7 +243,7 @@ void QuicPacketGenerator::GenerateMtuDiscoveryPacket( |
// The MTU discovery frame is allocated on the stack, since it is going to be |
// serialized within this function. |
QuicMtuDiscoveryFrame mtu_discovery_frame; |
- QuicFrame frame(&mtu_discovery_frame); |
+ QuicFrame frame(mtu_discovery_frame); |
// Send the probe packet with the new length. |
SetMaxPacketLength(target_mtu, /*force=*/true); |