diff options
Diffstat (limited to 'src/core/surface')
-rw-r--r-- | src/core/surface/secure_channel_create.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/surface/secure_channel_create.c b/src/core/surface/secure_channel_create.c index c9a54d9237..c0a53e9cc0 100644 --- a/src/core/surface/secure_channel_create.c +++ b/src/core/surface/secure_channel_create.c @@ -306,6 +306,13 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, GRPC_CHANNEL_INTERNAL_REF(channel, "subchannel_factory"); resolver = grpc_resolver_create(target, &f->base); if (!resolver) { + grpc_subchannel_factory_unref(&exec_ctx, &f->base); + GRPC_SECURITY_CONNECTOR_UNREF(&security_connector->base, "channel_create"); + grpc_channel_args_destroy(args_copy); + if (new_args_from_connector != NULL) { + grpc_channel_args_destroy(new_args_from_connector); + } + GRPC_CHANNEL_INTERNAL_UNREF(&exec_ctx, channel, "subchannel_factory"); grpc_exec_ctx_finish(&exec_ctx); return NULL; } |