diff options
author | Ian Boros <ian.boros@mongodb.com> | 2020-11-23 18:24:18 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-23 23:44:13 +0000 |
commit | a05141a3e51a8eee3ae620f77f8bf2b7927a8a57 (patch) | |
tree | 3017984411c14996689eb6eb1a7af4e577c3b9da | |
parent | a2c49f836faedb6ef9e6d43459f6d6949525e0b1 (diff) | |
download | mongo-a05141a3e51a8eee3ae620f77f8bf2b7927a8a57.tar.gz |
SERVER-52968 Fix unowned memory bug in SBE
-rw-r--r-- | src/mongo/db/query/sbe_runtime_planner.cpp | 2 |
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; |