From c5f3e268a1c6aa3721a951c127d84d408935a047 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 May 2015 10:15:00 -0700 Subject: Fix potential leak --- src/core/surface/call.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 7ab9142947..57be72f9ab 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -711,6 +711,10 @@ static void call_on_done_recv(void *pc, int success) { break; } } + if (!success) { + grpc_stream_ops_unref_owned_objects(&call->recv_ops.ops[i], + call->recv_ops.nops - i); + } if (call->recv_state == GRPC_STREAM_RECV_CLOSED) { GPR_ASSERT(call->read_state <= READ_STATE_READ_CLOSED); call->read_state = READ_STATE_READ_CLOSED; -- cgit v1.2.3