diff options
author | Craig Tiller <ctiller@google.com> | 2015-05-07 10:15:00 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-05-07 10:15:00 -0700 |
commit | c5f3e268a1c6aa3721a951c127d84d408935a047 (patch) | |
tree | d4a0fa2266c44d1c4ac3b9f27c6b1ae7dfda0a5f /src/core | |
parent | 63733efd730316c0317a5df4f288aac242014d91 (diff) |
Fix potential leak
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/surface/call.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |