diff options
author | Dianna Hohensee <dianna.hohensee@10gen.com> | 2016-04-29 09:41:32 -0400 |
---|---|---|
committer | Dianna Hohensee <dianna.hohensee@10gen.com> | 2016-04-29 11:02:05 -0400 |
commit | 18802c0618405df6ebc4bc0c4ac7eb3d82d00f07 (patch) | |
tree | 4b4825e5f5e7d9f1e03863ce1a019ddfcf4c6544 /src/mongo/s/client/shard_local_test.cpp | |
parent | 6bd161db45bf3d08bffa0611fdfabbd4c597faff (diff) | |
download | mongo-18802c0618405df6ebc4bc0c4ac7eb3d82d00f07.tar.gz |
SERVER-23496 Fixing a memory leak in shard_local_test.cpp
Diffstat (limited to 'src/mongo/s/client/shard_local_test.cpp')
-rw-r--r-- | src/mongo/s/client/shard_local_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/s/client/shard_local_test.cpp b/src/mongo/s/client/shard_local_test.cpp index e45840e869a..709aa7fb7fc 100644 --- a/src/mongo/s/client/shard_local_test.cpp +++ b/src/mongo/s/client/shard_local_test.cpp @@ -46,7 +46,7 @@ namespace { class ShardLocalTest : public ServiceContextMongoDTest { protected: ServiceContext::UniqueOperationContext _txn; - ShardLocal* _shardLocal; + std::unique_ptr<ShardLocal> _shardLocal; /** * Sets up and runs a FindAndModify command with ShardLocal's runCommand. Finds a document in @@ -75,7 +75,7 @@ void ShardLocalTest::setUp() { ServiceContextMongoDTest::setUp(); Client::initThreadIfNotAlready(); _txn = getGlobalServiceContext()->makeOperationContext(&cc()); - _shardLocal = new ShardLocal("shardOrConfig"); + _shardLocal = stdx::make_unique<ShardLocal>("shardOrConfig"); const repl::ReplSettings replSettings = {}; repl::setGlobalReplicationCoordinator(new repl::ReplicationCoordinatorMock(replSettings)); } |