| Index: net/quic/quic_utils.cc
|
| diff --git a/net/quic/quic_utils.cc b/net/quic/quic_utils.cc
|
| index 7973e481d983a5f795ddff98a628475132674257..d90af26e67a6c604bf75a419caf9ff25ab23774a 100644
|
| --- a/net/quic/quic_utils.cc
|
| +++ b/net/quic/quic_utils.cc
|
| @@ -458,8 +458,8 @@ void QuicUtils::ClearSerializedPacket(SerializedPacket* serialized_packet) {
|
| if (!serialized_packet->retransmittable_frames.empty()) {
|
| DeleteFrames(&serialized_packet->retransmittable_frames);
|
| }
|
| - delete serialized_packet->packet;
|
| - serialized_packet->packet = nullptr;
|
| + serialized_packet->encrypted_buffer = nullptr;
|
| + serialized_packet->encrypted_length = 0;
|
| }
|
|
|
| // static
|
| @@ -477,4 +477,10 @@ uint64_t QuicUtils::PackPathIdAndPacketNumber(QuicPathId path_id,
|
| return path_id_packet_number;
|
| }
|
|
|
| +char* QuicUtils::CopyBuffer(const SerializedPacket& packet) {
|
| + char* dst_buffer = new char[packet.encrypted_length];
|
| + memcpy(dst_buffer, packet.encrypted_buffer, packet.encrypted_length);
|
| + return dst_buffer;
|
| +}
|
| +
|
| } // namespace net
|
|
|