fix some memleaks in DiscIO. Fix for issue 1238.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3936 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2009-08-03 22:51:13 +00:00
parent 3ac6b08456
commit 0cb7934d93
10 changed files with 22 additions and 177 deletions

View File

@ -253,12 +253,12 @@ bool CNANDContentLoader::CreateFromDirectory(const std::string& _rPath)
FILE* pFile = fopen(szFilename, "rb");
if (pFile != NULL)
{
u64 Size = File::GetSize(szFilename);
rContent.m_pData = new u8[(u32)Size];
u64 ContentSize = File::GetSize(szFilename);
rContent.m_pData = new u8[(u32)ContentSize];
_dbg_assert_msg_(BOOT, rContent.m_Size==Size, "TMDLoader: Filesize doesnt fit (%s %i)... prolly you have a bad dump", szFilename, i);
_dbg_assert_msg_(BOOT, rContent.m_Size==ContentSize, "TMDLoader: Filesize doesnt fit (%s %i)... prolly you have a bad dump", szFilename, i);
fread(rContent.m_pData, (size_t)Size, 1, pFile);
fread(rContent.m_pData, (size_t)ContentSize, 1, pFile);
fclose(pFile);
}
else