Skip to content

Commit

Permalink
php: fix channel reuse doesn't free allocated wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouyihaiDing committed Jan 23, 2018
1 parent 2318b87 commit 8a84593
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/php/ext/grpc/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ PHP_METHOD(Channel, __construct) {
channel->wrapper->creds_hashstr = NULL;
}
free(channel->wrapper->creds_hashstr);
free(channel->wrapper->key);
free(channel->wrapper->target);
free(channel->wrapper->args_hashstr);
free(channel->wrapper);
channel->wrapper = le->channel;
}
}
Expand Down

0 comments on commit 8a84593

Please sign in to comment.