diff options
author | galon1 <gil.alon@mongodb.com> | 2022-09-01 21:02:02 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-09-01 21:49:00 +0000 |
commit | c00d004b124056e3cae35410dfe24c726adbac08 (patch) | |
tree | b24d1ccc157bbb970984faa86e3ceae4d409540b | |
parent | 83746d12c98402b88a173d35757138b59f27bc5a (diff) | |
download | mongo-c00d004b124056e3cae35410dfe24c726adbac08.tar.gz |
SERVER-68998 Fix coverity warning using a moved object
-rw-r--r-- | src/mongo/db/query/multiple_collection_accessor.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/query/multiple_collection_accessor.h b/src/mongo/db/query/multiple_collection_accessor.h index 26fc081000e..bf8c0ad5fe9 100644 --- a/src/mongo/db/query/multiple_collection_accessor.h +++ b/src/mongo/db/query/multiple_collection_accessor.h @@ -60,8 +60,8 @@ public: // Even if the collection corresponding to 'secondaryNss' doesn't exist, we // still want to include it. It is the responsibility of consumers of this class // to verify that a collection exists before accessing it. - _secondaryColls.emplace(std::move(secondaryNss), - catalog->lookupCollectionByNamespace(opCtx, secondaryNss)); + auto collPtr = catalog->lookupCollectionByNamespace(opCtx, secondaryNss); + _secondaryColls.emplace(std::move(secondaryNss), std::move(collPtr)); } } } |