aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php
diff options
context:
space:
mode:
authorGravatar Zhouyihai Ding <ddyihai@google.com>2018-01-16 13:49:31 -0800
committerGravatar GitHub <noreply@github.com>2018-01-16 13:49:31 -0800
commit4b0e8858248c87b73a7ff36160554598511a1dc9 (patch)
tree65ae95719843ad4e4d91a679892f8e33337bb666 /src/php
parent0fd2d7cf35a45dc8196768acad2516c5b7d7a04f (diff)
parentb6cdfca30a5f09975ee7789a66d5b248f92b5c50 (diff)
Merge pull request #14017 from ZhouyihaiDing/php_channl_memory_leak
php: fix memory leak during creating channel
Diffstat (limited to 'src/php')
-rw-r--r--src/php/ext/grpc/channel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c
index dc3acc89bb..db59869c7f 100644
--- a/src/php/ext/grpc/channel.c
+++ b/src/php/ext/grpc/channel.c
@@ -242,6 +242,7 @@ PHP_METHOD(Channel, __construct) {
// parse the rest of the channel args array
if (php_grpc_read_args_array(args_array, &args TSRMLS_CC) == FAILURE) {
+ efree(args.args);
return;
}
@@ -301,6 +302,7 @@ PHP_METHOD(Channel, __construct) {
create_and_add_channel_to_persistent_list(
channel, target, args, creds, key, key_len TSRMLS_CC);
} else {
+ efree(args.args);
channel->wrapper = le->channel;
}
}