aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-04-07 10:34:33 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-04-07 10:34:33 -0700
commita3fda8fdc94aa7dcb3e0da0dfc28e3d85b5cf798 (patch)
tree6b7db055c432dc6391d0ec4880a55ae21e6afb81 /test
parent3a0b8477c206e45ff1866f73daa4f91643e5bf16 (diff)
Fix bm_chttp2_transport memory leak
Diffstat (limited to 'test')
-rw-r--r--test/cpp/microbenchmarks/bm_chttp2_transport.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/cpp/microbenchmarks/bm_chttp2_transport.cc b/test/cpp/microbenchmarks/bm_chttp2_transport.cc
index d3ca27a68e..5456f69d50 100644
--- a/test/cpp/microbenchmarks/bm_chttp2_transport.cc
+++ b/test/cpp/microbenchmarks/bm_chttp2_transport.cc
@@ -574,7 +574,9 @@ static void BM_TransportStreamRecv(benchmark::State &state) {
drain_continue.get()) &&
GRPC_ERROR_NONE ==
grpc_byte_stream_pull(exec_ctx, recv_stream, &recv_slice) &&
- (received += GRPC_SLICE_LENGTH(recv_slice), true));
+ (received += GRPC_SLICE_LENGTH(recv_slice),
+ grpc_slice_unref_internal(exec_ctx, recv_slice),
+ true));
});
drain_continue = MakeClosure([&](grpc_exec_ctx *exec_ctx, grpc_error *error) {