Moved unref of security connector outside of grpc_secure_channel_create

pull/8450/head
David Garcia Quintas 8 years ago
parent 79fd4e6874
commit 30bce6ab1b
  1. 5
      src/core/ext/transport/chttp2/client/secure/secure_channel_create.c

@ -290,8 +290,6 @@ static grpc_channel *client_channel_factory_create_channel(
channel = NULL;
}
GRPC_SECURITY_CONNECTOR_UNREF(&f->security_connector->base,
"client_channel_factory_create_channel");
return channel;
}
@ -360,6 +358,9 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds,
grpc_channel *channel = client_channel_factory_create_channel(
&exec_ctx, &f->base, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, NULL);
GRPC_SECURITY_CONNECTOR_UNREF(&f->security_connector->base,
"client_channel_factory_create_channel");
grpc_client_channel_factory_unref(&exec_ctx, &f->base);
grpc_exec_ctx_finish(&exec_ctx);

Loading…
Cancel
Save