Fix nullptr access when cow reader open fails
Bug: 260805150 Test: th Change-Id: Id945cc4fa0fce141e3d52b8259241e22ba590ebd
This commit is contained in:
parent
ccf13942e0
commit
bc1a5b1393
|
@ -93,6 +93,9 @@ bool CompressedSnapshotWriter::VerifyMergeOps() const noexcept {
|
|||
|
||||
std::unique_ptr<FileDescriptor> CompressedSnapshotWriter::OpenReader() {
|
||||
auto cow = OpenCowReader();
|
||||
if (cow == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto reader = std::make_unique<CompressedSnapshotReader>();
|
||||
if (!reader->SetCow(std::move(cow))) {
|
||||
|
|
Loading…
Reference in New Issue