Skip to content

Commit

Permalink
Fix two memory leaks and update a link in the README. (#501)
Browse files Browse the repository at this point in the history
Fixes #340.
  • Loading branch information
MrMage authored Jul 5, 2019
1 parent 38b9895 commit 7c9a83c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Examples/Google/NaturalLanguage/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 2 additions & 0 deletions Sources/CgRPC/shim/channel_shim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 7c9a83c

Please sign in to comment.