From 835afc0fcf0d257cc305bbb1fd3b56c65469233c Mon Sep 17 00:00:00 2001 From: Ming-Chuan Date: Wed, 15 Dec 2021 09:33:56 +0800 Subject: [PATCH] [BinderTransport] Add missing ChannelArgsPreconditioning (#28347) This fixes crash in example app --- src/core/ext/transport/binder/client/channel_create_impl.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/ext/transport/binder/client/channel_create_impl.cc b/src/core/ext/transport/binder/client/channel_create_impl.cc index e8ffc9aa784..4a6d6094847 100644 --- a/src/core/ext/transport/binder/client/channel_create_impl.cc +++ b/src/core/ext/transport/binder/client/channel_create_impl.cc @@ -75,6 +75,10 @@ grpc_channel* CreateClientBinderChannelImpl(const grpc_channel_args* args) { gpr_once_init(&g_factory_once, FactoryInit); + args = grpc_core::CoreConfiguration::Get() + .channel_args_preconditioning() + .PreconditionChannelArgs(args); + // Set channel factory argument grpc_arg channel_factory_arg = grpc_core::ClientChannelFactory::CreateChannelArg(g_factory); @@ -90,6 +94,8 @@ grpc_channel* CreateClientBinderChannelImpl(const grpc_channel_args* args) { // Clean up. grpc_channel_args_destroy(new_args); + grpc_channel_args_destroy(args); + if (channel == nullptr) { intptr_t integer; grpc_status_code status = GRPC_STATUS_INTERNAL;