diff options
author | Sanika Phanse <sanika.phanse@mongodb.com> | 2022-08-16 20:48:16 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-16 22:27:11 +0000 |
commit | 77c20f24deb5d4d930161e37a635ffe7cf11761f (patch) | |
tree | 3899a4a13b890b592526c74b952e037f2bf1af01 /src/mongo/db | |
parent | 3515965275712491cf3b31ce1c99ff7d3e04464d (diff) | |
download | mongo-77c20f24deb5d4d930161e37a635ffe7cf11761f.tar.gz |
SERVER-68238 Coverity analysis defect 123341: Pointer to local outside scope
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/internal_session_pool.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/internal_session_pool.cpp b/src/mongo/db/internal_session_pool.cpp index ce5a94306ee..ff648c880fe 100644 --- a/src/mongo/db/internal_session_pool.cpp +++ b/src/mongo/db/internal_session_pool.cpp @@ -100,10 +100,9 @@ InternalSessionPool::Session InternalSessionPool::acquireSystemSession() { const InternalSessionPool::Session session = [&] { stdx::lock_guard<Latch> lock(_mutex); - const auto& systemUserDigest = makeSystemLogicalSessionId().getUid(); - auto session = _acquireSession(systemUserDigest, lock); - return session ? *session - : InternalSessionPool::Session(makeSystemLogicalSessionId(), TxnNumber(0)); + const auto& systemSession = makeSystemLogicalSessionId(); + auto session = _acquireSession(systemSession.getUid(), lock); + return session ? *session : InternalSessionPool::Session(systemSession, TxnNumber(0)); }(); LOGV2_DEBUG(5876603, |