summaryrefslogtreecommitdiff
path: root/libs/binder/RpcSession.cpp
diff options
context:
space:
mode:
author Andrei Homescu <ahomescu@google.com> 2022-05-12 00:52:34 +0000
committer Andrei Homescu <ahomescu@google.com> 2022-06-10 00:23:51 +0000
commit5e30146515bf3c6fa9632bf2ee0aef288cfe180f (patch)
tree5db109b3e239b87144c8ca0a11d0055b2039b14c /libs/binder/RpcSession.cpp
parent86124ca8d2983bd3eefb2e48d1fcfd6d7f3df70f (diff)
libbinder: clear RpcTransportCtx for new sessions in RpcServer
RpcServer previously created new RpcSession instances using the default transport. There is currently no code in RpcSession that uses that transport for server sessions, so this patch initializes the transport to nullptr instead. Bug: 224644083 Test: atest binderRpcTest Change-Id: Ie9fa8c9c758821614fb161b360a9935955e7e62b
Diffstat (limited to 'libs/binder/RpcSession.cpp')
-rw-r--r--libs/binder/RpcSession.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/binder/RpcSession.cpp b/libs/binder/RpcSession.cpp
index 5c35dd0ac1..8edc78f2f5 100644
--- a/libs/binder/RpcSession.cpp
+++ b/libs/binder/RpcSession.cpp
@@ -715,6 +715,7 @@ bool RpcSession::setForServer(const wp<RpcServer>& server, const wp<EventListene
LOG_ALWAYS_FATAL_IF(mEventListener != nullptr);
LOG_ALWAYS_FATAL_IF(eventListener == nullptr);
LOG_ALWAYS_FATAL_IF(mShutdownTrigger != nullptr);
+ LOG_ALWAYS_FATAL_IF(mCtx != nullptr);
mShutdownTrigger = FdTrigger::make();
if (mShutdownTrigger == nullptr) return false;