From 1371abd306e33f87b8016a587e3decc73b3fafdf Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 14 Jan 2015 15:58:45 -0800 Subject: Fix refcounting bug --- src/core/surface/call.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 24c1567db9..6f8e0d5db7 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -465,6 +465,8 @@ static void call_started(void *user_data, grpc_op_error error) { done_writes_done(call, error); } } + + grpc_call_internal_unref(call); } grpc_call_error grpc_call_invoke(grpc_call *call, grpc_completion_queue *cq, @@ -531,6 +533,7 @@ grpc_call_error grpc_call_invoke(grpc_call *call, grpc_completion_queue *cq, op.done_cb = call_started; op.data.start.pollset = grpc_cq_pollset(cq); op.user_data = call; + grpc_call_internal_ref(call); elem = CALL_ELEM_FROM_CALL(call, 0); elem->filter->call_op(elem, NULL, &op); -- cgit v1.2.3