From b16557b573d0774a58b3da44d776328492c2e4fe Mon Sep 17 00:00:00 2001 From: Ming-Chuan Date: Fri, 1 Oct 2021 11:05:39 +0800 Subject: [PATCH] Assert binder is not null when creating binder transport (#27527) --- src/core/ext/transport/binder/transport/binder_transport.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/ext/transport/binder/transport/binder_transport.cc b/src/core/ext/transport/binder/transport/binder_transport.cc index 94a63eb060e..9c64a72fb93 100644 --- a/src/core/ext/transport/binder/transport/binder_transport.cc +++ b/src/core/ext/transport/binder/transport/binder_transport.cc @@ -740,6 +740,8 @@ grpc_transport* grpc_create_binder_transport_client( std::unique_ptr endpoint_binder) { gpr_log(GPR_INFO, __func__); + GPR_ASSERT(endpoint_binder != nullptr); + grpc_binder_transport* t = new grpc_binder_transport(std::move(endpoint_binder), /*is_client=*/true); @@ -750,6 +752,8 @@ grpc_transport* grpc_create_binder_transport_server( std::unique_ptr client_binder) { gpr_log(GPR_INFO, __func__); + GPR_ASSERT(client_binder != nullptr); + grpc_binder_transport* t = new grpc_binder_transport(std::move(client_binder), /*is_client=*/false);