Merge pull request #3673 from ajbeamon/fix-memory-error

Fix memory error caused by referencing a value with limited lifetime
This commit is contained in:
Trevor Clinkenbeard 2020-08-20 11:47:07 -07:00 committed by GitHub
commit 6077073ac9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 ) {