summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2020-11-23 18:24:18 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-23 23:44:13 +0000
commita05141a3e51a8eee3ae620f77f8bf2b7927a8a57 (patch)
tree3017984411c14996689eb6eb1a7af4e577c3b9da
parenta2c49f836faedb6ef9e6d43459f6d6949525e0b1 (diff)
downloadmongo-a05141a3e51a8eee3ae620f77f8bf2b7927a8a57.tar.gz
SERVER-52968 Fix unowned memory bug in SBE
-rw-r--r--src/mongo/db/query/sbe_runtime_planner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/query/sbe_runtime_planner.cpp b/src/mongo/db/query/sbe_runtime_planner.cpp
index ef809d1cec6..fe6df1f1b11 100644
--- a/src/mongo/db/query/sbe_runtime_planner.cpp
+++ b/src/mongo/db/query/sbe_runtime_planner.cpp
@@ -66,7 +66,7 @@ bool fetchNextDocument(plan_ranker::CandidatePlan* candidate,
}
invariant(state == sbe::PlanState::ADVANCED);
- candidate->results.push({std::move(obj), {recordIdSlot != nullptr, recordId}});
+ candidate->results.push({obj.getOwned(), {recordIdSlot != nullptr, recordId}});
} catch (const ExceptionFor<ErrorCodes::QueryTrialRunCompleted>&) {
candidate->exitedEarly = true;
return true;