Skip to content

Commit

Permalink
Cast malloc result
Browse files Browse the repository at this point in the history
  • Loading branch information
armstrongnate committed Jun 6, 2018
1 parent f477ce5 commit a2b983a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/CgRPC/shim/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cgrpc_channel *cgrpc_channel_create_secure(const char *address,
channel_args.args = args;
channel_args.num_args = num_args;

grpc_ssl_pem_key_cert_pair *client_credentials = malloc(sizeof (struct grpc_ssl_pem_key_cert_pair));
grpc_ssl_pem_key_cert_pair *client_credentials = (grpc_ssl_pem_key_cert_pair *) malloc(sizeof (struct grpc_ssl_pem_key_cert_pair));
client_credentials->cert_chain = client_certs;
client_credentials->private_key = client_private_key;
if (client_certs == NULL || client_private_key == NULL) {
Expand Down

0 comments on commit a2b983a

Please sign in to comment.