diff options
author | Will Buerger <will.buerger@mongodb.com> | 2022-08-30 21:11:07 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-30 23:33:20 +0000 |
commit | 6fbccbff53e97e48e3813f4fa1197b2513ae5fdb (patch) | |
tree | 3f3ff50b395dd60f2e0ca530bf733a2ec0449674 /src | |
parent | 2038ae216216641fff45d8791a3b560a00e86aa5 (diff) | |
download | mongo-6fbccbff53e97e48e3813f4fa1197b2513ae5fdb.tar.gz |
SERVER-68788 Coverity analysis defect 122654: Using a moved object
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/exec/sbe/stages/collection_helpers.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/exec/sbe/stages/collection_helpers.cpp b/src/mongo/db/exec/sbe/stages/collection_helpers.cpp index 6eec51407dd..66ddb039f64 100644 --- a/src/mongo/db/exec/sbe/stages/collection_helpers.cpp +++ b/src/mongo/db/exec/sbe/stages/collection_helpers.cpp @@ -44,8 +44,9 @@ std::tuple<CollectionPtr, NamespaceString, uint64_t> acquireCollection(Operation CollectionPtr collPtr = CollectionCatalog::get(opCtx)->lookupCollectionByUUID(opCtx, collUuid); tassert(5071000, str::stream() << "Collection uuid " << collUuid << " does not exist", collPtr); + auto nss = collPtr->ns(); return std::make_tuple( - std::move(collPtr), collPtr->ns(), CollectionCatalog::get(opCtx)->getEpoch()); + std::move(collPtr), std::move(nss), CollectionCatalog::get(opCtx)->getEpoch()); } CollectionPtr restoreCollection(OperationContext* opCtx, |