diff --git a/Examples/Google/NaturalLanguage/README.md b/Examples/Google/NaturalLanguage/README.md index ef58fc6a3..83ea59478 100644 --- a/Examples/Google/NaturalLanguage/README.md +++ b/Examples/Google/NaturalLanguage/README.md @@ -1,7 +1,7 @@ # Calling the Google Cloud Natural Language API This directory contains a very simple sample that calls the -[Google Cloud Natural Language API](https://cloud.google.com/datastore/docs/reference/rpc/google.datastore.v1). +[Google Cloud Natural Language API](https://cloud.google.com/natural-language/docs/reference/rpc/google.cloud.language.v1). Calls are made directly to the Cloud Natural Language RPC interface. In practice, these would be wrapped in idiomatic code. diff --git a/Sources/CgRPC/shim/channel_shim.c b/Sources/CgRPC/shim/channel_shim.c index 8ee0408ab..7b03e0efc 100644 --- a/Sources/CgRPC/shim/channel_shim.c +++ b/Sources/CgRPC/shim/channel_shim.c @@ -56,6 +56,7 @@ cgrpc_channel *cgrpc_channel_create_secure(const char *address, grpc_channel_credentials *creds = grpc_ssl_credentials_create(pem_root_certs, client_credentials_pointer, NULL, NULL); c->channel = grpc_secure_channel_create(creds, address, &channel_args, NULL); + grpc_channel_credentials_release(creds); c->completion_queue = grpc_completion_queue_create_for_next(NULL); return c; } @@ -72,6 +73,7 @@ cgrpc_channel *cgrpc_channel_create_google(const char *address, grpc_channel_credentials *google_creds = grpc_google_default_credentials_create(); c->channel = grpc_secure_channel_create(google_creds, address, &channel_args, NULL); + grpc_channel_credentials_release(google_creds); c->completion_queue = grpc_completion_queue_create_for_next(NULL); return c; }