From 6ca5437b61fe32cbf2636ca436a8585ff66d574c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 13 Jul 2016 10:41:49 -0700 Subject: Fix potential null ptr deref --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/ext/transport') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index d5695fe49c..554a0f56dc 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -712,8 +712,9 @@ static void finish_global_actions(grpc_exec_ctx *exec_ctx, set_write_state(t, GRPC_CHTTP2_WRITE_SCHEDULED, "unlocking"); REF_TRANSPORT(t, "initiate_writing"); gpr_mu_unlock(&t->executor.mu); - grpc_exec_ctx_sched(exec_ctx, &t->initiate_writing, GRPC_ERROR_NONE, - grpc_endpoint_get_workqueue(t->ep)); + grpc_exec_ctx_sched( + exec_ctx, &t->initiate_writing, GRPC_ERROR_NONE, + t->ep != NULL ? grpc_endpoint_get_workqueue(t->ep) : NULL); break; case GRPC_CHTTP2_WRITE_REQUESTED_NO_POLLER: start_writing(exec_ctx, t); -- cgit v1.2.3