diff options
| -rw-r--r-- | libs/binder/trusty/RpcServerTrusty.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/binder/trusty/RpcServerTrusty.cpp b/libs/binder/trusty/RpcServerTrusty.cpp index 17919c2a25..05800464ac 100644 --- a/libs/binder/trusty/RpcServerTrusty.cpp +++ b/libs/binder/trusty/RpcServerTrusty.cpp @@ -151,8 +151,10 @@ int RpcServerTrusty::handleMessage(const tipc_port* /*port*/, handle_t /*chan*/, int RpcServerTrusty::handleMessageInternal(void* ctx) { auto* channelContext = reinterpret_cast<ChannelContext*>(ctx); - LOG_ALWAYS_FATAL_IF(channelContext == nullptr, - "bad state: message received on uninitialized channel"); + if (channelContext == nullptr) { + LOG_RPC_DETAIL("bad state: message received on uninitialized channel"); + return ERR_BAD_STATE; + } auto& session = channelContext->session; auto& connection = channelContext->connection; |