DiscIO: Don't keep volume pointer in DiscScrubber

Keeping the pointer creates use-after-free opportunities, and we don't
have much reason to keep it around anyway.
This commit is contained in:
JosJuice
2023-08-19 17:14:35 +02:00
parent ed7894924c
commit 0f64df3e3e
4 changed files with 39 additions and 41 deletions

View File

@ -27,7 +27,7 @@ std::unique_ptr<ScrubbedBlob> ScrubbedBlob::Create(const std::string& path)
return nullptr;
DiscScrubber scrubber;
if (!scrubber.SetupScrub(disc.get()))
if (!scrubber.SetupScrub(*disc))
return nullptr;
std::unique_ptr<BlobReader> blob = CreateBlobReader(path);