fix some memleaks in NANDContentLoader.cpp and ISOProperties.cpp
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3919 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
dedb2a5fcc
commit
1493c2ba9c
|
@ -127,7 +127,7 @@ bool Scrub(const char* filename, CompressCB callback, void* arg)
|
||||||
|
|
||||||
// Warn if not DVD5 or DVD9 size
|
// Warn if not DVD5 or DVD9 size
|
||||||
if (numClusters != 0x23048 && numClusters != 0x46090)
|
if (numClusters != 0x23048 && numClusters != 0x46090)
|
||||||
WARN_LOG(DISCIO, "%s is not a standard sized wii m_Disc! (%x blocks)", filename, numClusters);
|
WARN_LOG(DISCIO, "%s is not a standard sized wii disc! (%x blocks)", filename, numClusters);
|
||||||
|
|
||||||
// Table of free blocks
|
// Table of free blocks
|
||||||
m_FreeTable = new u8[numClusters];
|
m_FreeTable = new u8[numClusters];
|
||||||
|
|
|
@ -72,6 +72,7 @@ CSharedContent::CSharedContent()
|
||||||
m_Elements.push_back(Element);
|
m_Elements.push_back(Element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fclose(pFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,15 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||||
CISOProperties::~CISOProperties()
|
CISOProperties::~CISOProperties()
|
||||||
{
|
{
|
||||||
if (IsVolumeWiiDisc(OpenISO))
|
if (IsVolumeWiiDisc(OpenISO))
|
||||||
WiiDisc.clear();
|
{
|
||||||
|
for (std::vector<WiiPartition>::const_iterator PartIter = WiiDisc.begin(); PartIter != WiiDisc.end(); ++PartIter)
|
||||||
|
{
|
||||||
|
delete PartIter->FileSystem;
|
||||||
|
delete PartIter->Partition;
|
||||||
|
for (std::vector<const DiscIO::SFileInfo *>::const_iterator FileIter = PartIter->Files.begin(); FileIter != PartIter->Files.end(); ++FileIter)
|
||||||
|
delete *FileIter;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
if (!IsVolumeWadFile(OpenISO))
|
if (!IsVolumeWadFile(OpenISO))
|
||||||
delete pFileSystem;
|
delete pFileSystem;
|
||||||
|
|
Loading…
Reference in New Issue