summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netfs/unittests/mockDaemon.cpp3
-rw-r--r--netfs/unittests/mockDaemon.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/netfs/unittests/mockDaemon.cpp b/netfs/unittests/mockDaemon.cpp
index 0cb3172..1ccd6b7 100644
--- a/netfs/unittests/mockDaemon.cpp
+++ b/netfs/unittests/mockDaemon.cpp
@@ -36,7 +36,6 @@ MockDaemonHost::stop()
{
if (daemon) {
daemon->stop();
- delete daemon;
}
if (ic) {
ic->destroy();
@@ -51,7 +50,7 @@ MockDaemonHost::start()
id.properties->parseCommandLineOptions("", params);
ic = Ice::initialize(id);
ic->getProperties()->setProperty("NetFSD.HostNameOverride", "unittest");
- daemon = new MockDaemon(testEndpoint);
+ daemon = std::make_unique<MockDaemon>(testEndpoint);
daemon->start("NetFSDaemonAdapter", ic, {});
}
diff --git a/netfs/unittests/mockDaemon.h b/netfs/unittests/mockDaemon.h
index fb129c4..8bc6097 100644
--- a/netfs/unittests/mockDaemon.h
+++ b/netfs/unittests/mockDaemon.h
@@ -33,7 +33,7 @@ private:
const std::string testEndpoint;
Ice::StringSeq params;
- NetFSDaemon * daemon;
+ std::unique_ptr<NetFSDaemon> daemon;
};
#endif