summaryrefslogtreecommitdiff
path: root/libs/binder/RpcServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/binder/RpcServer.cpp')
-rw-r--r--libs/binder/RpcServer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp
index df07916f7a..1fa37bacb3 100644
--- a/libs/binder/RpcServer.cpp
+++ b/libs/binder/RpcServer.cpp
@@ -36,7 +36,7 @@ RpcServer::RpcServer() {}
RpcServer::~RpcServer() {}
sp<RpcServer> RpcServer::make() {
- return new RpcServer;
+ return sp<RpcServer>::make();
}
void RpcServer::iUnderstandThisCodeIsExperimentalAndIWillNotUseItInProduction() {
@@ -47,7 +47,7 @@ sp<RpcConnection> RpcServer::addClientConnection() {
LOG_ALWAYS_FATAL_IF(!mAgreedExperimental, "no!");
auto connection = RpcConnection::make();
- connection->setForServer(this);
+ connection->setForServer(sp<RpcServer>::fromExisting(this));
mConnections.push_back(connection);
return connection;
}