aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/util
diff options
context:
space:
mode:
authorGravatar Ara Ayvazyan <Aivazyan@microsoft.com>2018-05-22 20:47:35 -0700
committerGravatar Ara Ayvazyan <Aivazyan@microsoft.com>2018-05-22 20:47:35 -0700
commit8d06d097bc313eb8483bddfe716ccf39c50366f5 (patch)
tree630850625cdb48e52ff911e537a53baab40632d3 /src/cpp/util
parent18ce0cf26e733647b33cbaafee57245fdfb932e7 (diff)
Fix broken ByteBuffer copy ctor
Diffstat (limited to 'src/cpp/util')
-rw-r--r--src/cpp/util/byte_buffer_cc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cpp/util/byte_buffer_cc.cc b/src/cpp/util/byte_buffer_cc.cc
index 8700f96d8d..a7e1645435 100644
--- a/src/cpp/util/byte_buffer_cc.cc
+++ b/src/cpp/util/byte_buffer_cc.cc
@@ -43,8 +43,9 @@ Status ByteBuffer::Dump(std::vector<Slice>* slices) const {
return Status::OK;
}
-ByteBuffer::ByteBuffer(const ByteBuffer& buf)
- : buffer_(grpc_byte_buffer_copy(buf.buffer_)) {}
+ByteBuffer::ByteBuffer(const ByteBuffer& buf) : buffer_(nullptr) {
+ operator=(buf);
+}
ByteBuffer& ByteBuffer::operator=(const ByteBuffer& buf) {
if (this != &buf) {