diff options
author | yang-g <yangg@google.com> | 2015-12-10 14:04:00 -0800 |
---|---|---|
committer | yang-g <yangg@google.com> | 2015-12-10 14:04:00 -0800 |
commit | d482e59d3a05edc0797cbc49639ee7a320e82055 (patch) | |
tree | 3deca796fb7f882a7ce822d83e2fc677ed30fead /src/core/surface | |
parent | 07c4b573cff8de30e25e76f96617019d2199961a (diff) |
add a test for secure_channel_create and fix cleanup code
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; } |