diff --git a/src/cpp/util/byte_buffer.cc b/src/cpp/util/byte_buffer.cc index 4c4772a92b30d6640b874ab57bf715271025c677..91ed66b7663d5ff580d066ba5bba330807442b08 100644 --- a/src/cpp/util/byte_buffer.cc +++ b/src/cpp/util/byte_buffer.cc @@ -104,8 +104,8 @@ ByteBuffer& ByteBuffer::operator=(const ByteBuffer& buf) { void ByteBuffer::Swap(ByteBuffer* other) { grpc_byte_buffer* tmp = other->buffer_; - other->buffer_ = this->buffer_; - this->buffer_ = tmp; + other->buffer_ = buffer_; + buffer_ = tmp; } } // namespace grpc