diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-02-17 16:11:59 -0800 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-02-17 16:11:59 -0800 |
commit | e1b97b608af67ddc9e15fc9453346f7c7aeaeb79 (patch) | |
tree | a70144f07f5a297cb9f0ac92d4aae3ce4e600b63 /src/core | |
parent | 7cffec1e01622e031c4c8ca773c57b1eca1b34f8 (diff) | |
parent | 5882b53e9426fb9a55cfc2bf8f9ad09e1feb49df (diff) |
Merge pull request #557 from jboeuf/b542
Fixing memleak.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/security/security_context.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/security/security_context.c b/src/core/security/security_context.c index adb0269792..1909617614 100644 --- a/src/core/security/security_context.c +++ b/src/core/security/security_context.c @@ -349,11 +349,13 @@ static grpc_security_status ssl_channel_check_peer(grpc_security_context *ctx, void *user_data) { grpc_ssl_channel_security_context *c = (grpc_ssl_channel_security_context *)ctx; - grpc_security_status status = ssl_check_peer(c->overridden_target_name != NULL - ? c->overridden_target_name - : c->target_name, - &peer); + grpc_security_status status; + tsi_peer_destruct(&c->peer); c->peer = peer; + status = ssl_check_peer(c->overridden_target_name != NULL + ? c->overridden_target_name + : c->target_name, + &peer); return status; } |