mirror of https://github.com/PCSX2/pcsx2.git
pcsx2/cdvd: kill a small memory leak
This commit is contained in:
parent
e7d0a0345e
commit
1d5b250b58
|
@ -241,9 +241,12 @@ bool InputIsoFile::Open( const wxString& srcfile, bool testOnly )
|
|||
|
||||
m_reader->SetDataOffset(m_offset);
|
||||
m_reader->SetBlockSize(m_blocksize);
|
||||
|
||||
|
||||
// Returns the original reader if single-part or a Multipart reader otherwise
|
||||
AsyncFileReader* m_reader_old = m_reader;
|
||||
m_reader = MultipartFileReader::DetectMultipart(m_reader);
|
||||
if (m_reader != m_reader_old) // Not the same object the old one need to be deleted
|
||||
delete m_reader_old;
|
||||
}
|
||||
|
||||
m_blocks = m_reader->GetBlockCount();
|
||||
|
|
Loading…
Reference in New Issue