aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/security
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-12-02 16:47:35 +0000
committerGravatar Mark D. Roth <roth@google.com>2016-12-02 16:47:35 +0000
commitbd913a8637594e7432571a543a28095bf453a09f (patch)
treeeb0cb684dc603289c41dd572c16020e0eda92787 /src/core/lib/security
parenta5617850522ed729eb79ad040e87811ab6925484 (diff)
Fix asan failures.
Diffstat (limited to 'src/core/lib/security')
-rw-r--r--src/core/lib/security/transport/security_handshaker.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/lib/security/transport/security_handshaker.c b/src/core/lib/security/transport/security_handshaker.c
index 65982bbc85..fc01bec2f2 100644
--- a/src/core/lib/security/transport/security_handshaker.c
+++ b/src/core/lib/security/transport/security_handshaker.c
@@ -81,8 +81,7 @@ static void security_handshaker_unref(grpc_exec_ctx *exec_ctx,
security_handshaker *h) {
if (gpr_unref(&h->refs)) {
gpr_mu_destroy(&h->mu);
- if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker);
- if (h->handshake_buffer != NULL) gpr_free(h->handshake_buffer);
+ tsi_handshaker_destroy(h->handshaker);
if (h->endpoint_to_destroy != NULL) {
grpc_endpoint_destroy(exec_ctx, h->endpoint_to_destroy);
}
@@ -90,6 +89,7 @@ static void security_handshaker_unref(grpc_exec_ctx *exec_ctx,
grpc_slice_buffer_destroy(h->read_buffer_to_destroy);
gpr_free(h->read_buffer_to_destroy);
}
+ gpr_free(h->handshake_buffer);
grpc_slice_buffer_destroy(&h->left_overs);
grpc_slice_buffer_destroy(&h->outgoing);
GRPC_AUTH_CONTEXT_UNREF(h->auth_context, "handshake");