aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-11-29 14:24:42 -0800
committerGravatar Mark D. Roth <roth@google.com>2016-11-29 14:24:42 -0800
commit6c3d040ebf01605082d026fd721f87faacf966b5 (patch)
treead7be6a55579061dbdbf679cba2382039e1996e6 /src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c
parent95fcb58fc1c3f71e42dd1a7a618d31bf2ae6e43e (diff)
parent0610434185cd528b72e5be936075cae4c4a07a8e (diff)
Merge branch 'security_handshaker1' into security_handshaker2
Diffstat (limited to 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c')
-rw-r--r--src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c6
1 files changed, 3 insertions, 3 deletions
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 ab0cebe902..afdf93398f 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
@@ -121,8 +121,6 @@ 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_endpoint_destroy(exec_ctx, args->endpoint);
- gpr_free(args->read_buffer);
gpr_mu_lock(&connection_state->server_state->mu);
} else {
gpr_mu_lock(&connection_state->server_state->mu);
@@ -143,7 +141,10 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg,
// Need to destroy this here, because the server may have already
// gone away.
grpc_endpoint_destroy(exec_ctx, args->endpoint);
+ grpc_slice_buffer_destroy(args->read_buffer);
+ gpr_free(args->read_buffer);
}
+ grpc_channel_args_destroy(args->args);
}
pending_handshake_manager_remove_locked(connection_state->server_state,
connection_state->handshake_mgr);
@@ -151,7 +152,6 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg,
grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr);
grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp_server);
gpr_free(connection_state);
- grpc_channel_args_destroy(args->args);
}
static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp,