Index: net/quic/quic_utils.cc |
diff --git a/net/quic/quic_utils.cc b/net/quic/quic_utils.cc |
index 2213f0bfa8ffb55e1314a6579aaffb061baf73a8..047cfe2387f87a72f326c9416e5f458b44e872e1 100644 |
--- a/net/quic/quic_utils.cc |
+++ b/net/quic/quic_utils.cc |
@@ -455,12 +455,10 @@ void QuicUtils::RemoveFramesForStream(QuicFrames* frames, |
// static |
void QuicUtils::ClearSerializedPacket(SerializedPacket* serialized_packet) { |
- if (serialized_packet->retransmittable_frames != nullptr) { |
- DeleteFrames(serialized_packet->retransmittable_frames); |
+ if (!serialized_packet->retransmittable_frames.empty()) { |
+ DeleteFrames(&serialized_packet->retransmittable_frames); |
} |
- delete serialized_packet->retransmittable_frames; |
delete serialized_packet->packet; |
- serialized_packet->retransmittable_frames = nullptr; |
serialized_packet->packet = nullptr; |
} |