Skip to content
Snippets Groups Projects
Commit 3b3097fb authored by Yang Gao's avatar Yang Gao
Browse files

Remove an extra unref

parent d9a34251
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,6 @@ 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);
}
......
......@@ -149,7 +149,8 @@ class GenericEnd2endTest : public ::testing::Test {
GenericServerContext srv_ctx;
GenericServerAsyncReaderWriter stream(&srv_ctx);
send_request.set_message("Hello");
// The string needs to be long enough to test heap-based slice.
send_request.set_message("Hello world. Hello world. Hello world.");
std::unique_ptr<GenericClientAsyncReaderWriter> call =
generic_stub_->Call(&cli_ctx, kMethodName, &cli_cq_, tag(1));
client_ok(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment