From 745d63a844a3fcd1f497a1bcbc69ac8212d091b1 Mon Sep 17 00:00:00 2001
From: Craig Tiller <ctiller@google.com>
Date: Mon, 4 May 2015 15:27:51 -0700
Subject: [PATCH] Fix memory leak

---
 src/core/surface/completion_queue.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c
index 2f1d81ee84..060a8ff54a 100644
--- a/src/core/surface/completion_queue.c
+++ b/src/core/surface/completion_queue.c
@@ -163,6 +163,7 @@ void grpc_cq_end_op(grpc_completion_queue *cc, void *tag, grpc_call *call,
   ev->base.success = success;
   end_op_locked(cc, GRPC_OP_COMPLETE);
   gpr_mu_unlock(GRPC_POLLSET_MU(&cc->pollset));
+  if (call) GRPC_CALL_INTERNAL_UNREF(call, "cq", 0);
 }
 
 /* Create a GRPC_QUEUE_SHUTDOWN event without queuing it anywhere */
-- 
GitLab