Fix memory error caused by referencing a value with limited lifetime.

This commit is contained in:
A.J. Beamon 2020-08-20 11:12:59 -07:00
parent 4867bad46e
commit f0cdfb8781
1 changed files with 1 additions and 1 deletions

View File

@ -943,7 +943,7 @@ void determineCommittedTransactions(CommitBatchContext* self) {
self->lockedKey = pProxyCommitData->txnStateStore->readValue(databaseLockedKey).get();
self->locked = self->lockedKey.present() && self->lockedKey.get().size();
const auto& mustContainSystemKey = pProxyCommitData->txnStateStore->readValue(mustContainSystemMutationsKey).get();
const Optional<Value> mustContainSystemKey = pProxyCommitData->txnStateStore->readValue(mustContainSystemMutationsKey).get();
if (mustContainSystemKey.present() && mustContainSystemKey.get().size()) {
for (int t = 0; t < trs.size(); t++) {
if( self->committed[t] == ConflictBatch::TransactionCommitted ) {