Commit 7294f898 authored by cmumford's avatar cmumford Committed by Commit bot

SyncFS: Deleting iterator before closing database.

leveldb iterators must be deleted before closing the database or
else a crash will ensue.

BUG=581474

Review URL: https://codereview.chromium.org/1639043002

Cr-Commit-Position: refs/heads/master@{#371712}
parent 72a030e5
......@@ -599,6 +599,7 @@ SyncStatusCode LocalFileChangeTracker::TrackerDB::GetDirtyEntries(
LOG(WARNING) << "Failed to deserialize an URL. "
<< "TrackerDB might be corrupted.";
db_status_ = SYNC_DATABASE_ERROR_CORRUPTION;
iter.reset(); // Must delete before closing the database.
db_.reset();
return db_status_;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment