aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/transport/chttp2/client/insecure/channel_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ext/transport/chttp2/client/insecure/channel_create.c')
-rw-r--r--src/core/ext/transport/chttp2/client/insecure/channel_create.c2
1 files changed, 1 insertions, 1 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);