diff options
author | 2016-01-14 09:06:09 -0800 | |
---|---|---|
committer | 2016-01-14 09:07:58 -0800 | |
commit | f80573502ad66ede91fd6b1c6aa0d7c0dd8e1069 (patch) | |
tree | fa6fc46fb281b47a7ed7c3fad4bc1e6a95c267ca /src/cpp/util | |
parent | dafa125c7b01df1003b96ea2619eb39956f5ddcc (diff) |
destroy reader after using it
Diffstat (limited to 'src/cpp/util')
-rw-r--r-- | src/cpp/util/byte_buffer.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cpp/util/byte_buffer.cc b/src/cpp/util/byte_buffer.cc index df873eb1ce..2952f94b24 100644 --- a/src/cpp/util/byte_buffer.cc +++ b/src/cpp/util/byte_buffer.cc @@ -69,6 +69,7 @@ void ByteBuffer::Dump(std::vector<Slice>* slices) const { while (grpc_byte_buffer_reader_next(&reader, &s)) { slices->push_back(Slice(s, Slice::STEAL_REF)); } + grpc_byte_buffer_reader_destroy(&reader); } size_t ByteBuffer::Length() const { @@ -88,4 +89,4 @@ ByteBuffer& ByteBuffer::operator=(const ByteBuffer& buf) { return *this; } -} // namespace grpc
\ No newline at end of file +} // namespace grpc |