aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/util
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2015-03-10 12:51:05 -0700
committerGravatar Yang Gao <yangg@google.com>2015-03-10 12:51:05 -0700
commit086cd1108c2a4bbf247aaefab9959996aec0d33b (patch)
tree133802227a920b51021e3785d2ecb5437d275aab /src/cpp/util
parent61c413182dafc3d58874a62256b130d8df7bd77d (diff)
read and copy add two ref's, unref one
Diffstat (limited to 'src/cpp/util')
-rw-r--r--src/cpp/util/byte_buffer.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cpp/util/byte_buffer.cc b/src/cpp/util/byte_buffer.cc
index ac2657472c..f8d8eec065 100644
--- a/src/cpp/util/byte_buffer.cc
+++ b/src/cpp/util/byte_buffer.cc
@@ -60,6 +60,7 @@ void ByteBuffer::Dump(std::vector<Slice>* slices) {
gpr_slice s;
while (grpc_byte_buffer_reader_next(reader, &s)) {
slices->push_back(Slice(s, Slice::STEAL_REF));
+ gpr_slice_unref(s);
}
grpc_byte_buffer_reader_destroy(reader);
}