From 62fffaf56f79b4aeecc95aa91ba67a4e5ec832e4 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 27 Jan 2023 03:47:54 +1000 Subject: [PATCH] GzippedFileReader: Fix freeing potentially-invalid pointer --- pcsx2/CDVD/GzippedFileReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/CDVD/GzippedFileReader.cpp b/pcsx2/CDVD/GzippedFileReader.cpp index 15f4c5dfbe..25e37c8bff 100644 --- a/pcsx2/CDVD/GzippedFileReader.cpp +++ b/pcsx2/CDVD/GzippedFileReader.cpp @@ -293,7 +293,7 @@ bool GzippedFileReader::OkIndex() Console.Warning("This may take a while (but only once). Scanning compressed file to generate a quick access index..."); const s64 prevoffset = FileSystem::FTell64(m_src); - Access* index; + Access* index = nullptr; int len = build_index(m_src, GZFILE_SPAN_DEFAULT, &index); printf("\n"); // build_index prints progress without \n's FileSystem::FSeek64(m_src, prevoffset, SEEK_SET);