php: fix channel_credentials hashstr leak

pull/14156/head
Zhouyihai Ding 7 years ago
parent 1d8ab5a916
commit 2138362443
  1. 4
      src/php/ext/grpc/channel_credentials.c

@ -57,6 +57,10 @@ static grpc_ssl_roots_override_result get_ssl_roots_override(
/* Frees and destroys an instance of wrapped_grpc_channel_credentials */
PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_channel_credentials)
if (p->hashstr != NULL) {
free(p->hashstr);
p->hashstr = NULL;
}
if (p->wrapped != NULL) {
grpc_channel_credentials_release(p->wrapped);
p->wrapped = NULL;

Loading…
Cancel
Save