summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2019-10-07 21:13:43 +0000
committerevergreen <evergreen@mongodb.com>2019-10-07 21:13:43 +0000
commit5e4b02164d39679d181154258d1db2506a783e5f (patch)
tree7fc015983bd7f53aae96aed6561c3c2f716904dd
parent20e79fa97137b1d7afb64e451a3ba7840ab05920 (diff)
downloadmongo-5e4b02164d39679d181154258d1db2506a783e5f.tar.gz
SERVER-42744 Fix transation history iterator to not return potentially-dangling BSON
(cherry picked from commit 9da0de4279f88cf0113957434606abaa430f3227)
-rw-r--r--src/mongo/db/transaction_history_iterator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/transaction_history_iterator.cpp b/src/mongo/db/transaction_history_iterator.cpp
index e9e57c1d0b8..58986b77455 100644
--- a/src/mongo/db/transaction_history_iterator.cpp
+++ b/src/mongo/db/transaction_history_iterator.cpp
@@ -103,7 +103,7 @@ BSONObj findOneOplogEntry(OperationContext* opCtx,
"PlanExecutor error in TransactionHistoryIterator");
}
- return oplogBSON;
+ return oplogBSON.getOwned();
}
} // namespace