aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-15 08:20:20 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-15 08:20:20 -0700
commit131f6edafa1a281604fffc24019dcb99134eec9f (patch)
treea9d07123c1f2abbed609eba38411bba40520cd32 /src/core/iomgr
parent7dc34ac7a057abba51a38fb7f6a73ee827933e70 (diff)
Fix memory leak
Diffstat (limited to 'src/core/iomgr')
-rw-r--r--src/core/iomgr/iomgr.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/iomgr/iomgr.c b/src/core/iomgr/iomgr.c
index 1dd03992ae..d6ca5d1f71 100644
--- a/src/core/iomgr/iomgr.c
+++ b/src/core/iomgr/iomgr.c
@@ -34,16 +34,18 @@
#include "src/core/iomgr/iomgr.h"
#include <stdlib.h>
+#include <string.h>
-#include "src/core/iomgr/iomgr_internal.h"
-#include "src/core/iomgr/alarm_internal.h"
-#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
#include <grpc/support/thd.h>
+#include "src/core/iomgr/iomgr_internal.h"
+#include "src/core/iomgr/alarm_internal.h"
+#include "src/core/support/string.h"
+
static gpr_mu g_mu;
static gpr_cv g_rcv;
static grpc_iomgr_closure *g_cbs_head = NULL;
@@ -179,6 +181,8 @@ void grpc_iomgr_shutdown(void) {
}
gpr_mu_unlock(&g_mu);
+ memset(&g_root_object, 0, sizeof(g_root_object));
+
grpc_kick_poller();
gpr_event_wait(&g_background_callback_executor_done,
gpr_inf_future(GPR_CLOCK_REALTIME));