Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/common/quic/platform/quiche_mem_slice_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ class QuicheMemSliceImpl {
QuicheMemSliceImpl& operator=(const QuicheMemSliceImpl& other) = delete;
QuicheMemSliceImpl& operator=(QuicheMemSliceImpl&& other) noexcept {
if (this != &other) {
// OwnedImpl::move() appends data from `other` without clearing the buffer
// first. It is necessary to call Reset() beforehand to clear
// `single_slice_buffer_`.
Reset();
Comment thread
bencebeky marked this conversation as resolved.
fragment_ = std::move(other.fragment_);
single_slice_buffer_.move(other.single_slice_buffer_);
}
Expand Down