diff options
author | 2016-11-17 10:08:33 -0800 | |
---|---|---|
committer | 2016-11-17 10:08:33 -0800 | |
commit | 6446368d682bcc7ac898b2c76670f86ef4e9c272 (patch) | |
tree | b4111dedfbf0ec41f96019d00e16183845ba642a /src/core/ext/transport/chttp2 | |
parent | d4ed4fd17442ff18ed08702c20de1294f468bb38 (diff) | |
parent | d4d4ce5faca698551ec4bb2c52adc69433fe53c6 (diff) |
Merge branch 'security_handshaker1' into security_handshaker2
Diffstat (limited to 'src/core/ext/transport/chttp2')
4 files changed, 4 insertions, 6 deletions
diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index c4c1e638a9..e0bce57fc2 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -97,6 +97,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_handshaker_args *args = arg; connector *c = args->user_data; if (error != GRPC_ERROR_NONE) { + grpc_endpoint_destroy(exec_ctx, args->endpoint); grpc_channel_args_destroy(args->args); gpr_free(args->read_buffer); } else { @@ -107,7 +108,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, args->read_buffer); c->result->channel_args = args->args; } - gpr_free(args); grpc_closure *notify = c->notify; c->notify = NULL; grpc_exec_ctx_sched(exec_ctx, notify, GRPC_ERROR_REF(error), NULL); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 9478d0db7e..4bf04170eb 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -101,6 +101,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, if (error != GRPC_ERROR_NONE) { c->connecting_endpoint = NULL; gpr_mu_unlock(&c->mu); + grpc_endpoint_destroy(exec_ctx, args->endpoint); grpc_channel_args_destroy(args->args); gpr_free(args->read_buffer); } else { diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index 669a3869ab..5a9d4f8928 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -62,7 +62,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); - grpc_handshake_manager_shutdown(exec_ctx, state->handshake_mgr); + grpc_endpoint_destroy(exec_ctx, args->endpoint); gpr_free(args->read_buffer); } else { // Beware that the call to grpc_create_chttp2_transport() has to happen @@ -79,7 +79,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, } // Clean up. grpc_channel_args_destroy(args->args); - gpr_free(args); grpc_handshake_manager_destroy(exec_ctx, state->handshake_mgr); gpr_free(state); } diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 59aaf7fdd8..3cf5417397 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -122,9 +122,7 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); grpc_error_free_string(error_str); gpr_free(args->read_buffer); - if (args->endpoint != NULL) { - grpc_endpoint_destroy(exec_ctx, args->endpoint); - } + grpc_endpoint_destroy(exec_ctx, args->endpoint); gpr_mu_lock(&connection_state->server_state->mu); } else { gpr_mu_lock(&connection_state->server_state->mu); |