Prepare for dumping NPDRM isos, use shared_ptr to manage lifetime of BlockDevice

This commit is contained in:
Henrik Rydgård committed 2026-03-19 13:59:04 +01:00
1 parent 4c3d982182
commit 0e55129fab
11 files changed
+17 -16

No files matched your search

+1 -1
View File
@@ -813,7 +813,7 @@ handleELF:
info_->MarkReadyNoLock(flags_);
return;
}
BlockDevice *bd = ConstructBlockDevice(info_->GetFileLoader().get(), &errorString);
std::shared_ptr<BlockDevice> bd(ConstructBlockDevice(info_->GetFileLoader().get(), &errorString));
if (!bd) {
ERROR_LOG(Log::Loader, "Failed constructing block device for ISO %s: %s", info_->GetFilePath().ToVisualString().c_str(), errorString.c_str());
std::unique_lock<std::mutex> lock(info_->lock);