aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/channel/connected_channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/channel/connected_channel.c')
-rw-r--r--src/core/lib/channel/connected_channel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c
index 22caf24373..d8985268eb 100644
--- a/src/core/lib/channel/connected_channel.c
+++ b/src/core/lib/channel/connected_channel.c
@@ -128,7 +128,9 @@ static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx,
static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
grpc_channel_element *elem) {
channel_data *cd = (channel_data *)elem->channel_data;
- grpc_transport_destroy(exec_ctx, cd->transport);
+ if (cd->transport) {
+ grpc_transport_destroy(exec_ctx, cd->transport);
+ }
}
static char *con_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) {