aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-17 16:11:59 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-17 16:11:59 -0800
commite1b97b608af67ddc9e15fc9453346f7c7aeaeb79 (patch)
treea70144f07f5a297cb9f0ac92d4aae3ce4e600b63 /src/core
parent7cffec1e01622e031c4c8ca773c57b1eca1b34f8 (diff)
parent5882b53e9426fb9a55cfc2bf8f9ad09e1feb49df (diff)
Merge pull request #557 from jboeuf/b542
Fixing memleak.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/security/security_context.c10
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;
}