Merge pull request #14156 from ZhouyihaiDing/channel_hashstr_leak

php: fix channel_credentials hashstr leak
pull/14157/head
Stanley Cheung 7 years ago committed by GitHub
commit a14ce309ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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