fix obscure memory leak
This commit is contained in:
@@ -344,15 +344,15 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
|
|||||||
|
|
||||||
else if( 0==stricmp(sValueName,"NOTES") || 0==stricmp(sValueName,"NOTES2") )
|
else if( 0==stricmp(sValueName,"NOTES") || 0==stricmp(sValueName,"NOTES2") )
|
||||||
{
|
{
|
||||||
Steps* pNewNotes = new Steps;
|
|
||||||
ASSERT( pNewNotes );
|
|
||||||
|
|
||||||
if( iNumParams < 7 )
|
if( iNumParams < 7 )
|
||||||
{
|
{
|
||||||
LOG->Trace( "The song file '%s' is has %d fields in a #NOTES tag, but should have at least %d.", sPath.c_str(), iNumParams, 7 );
|
LOG->Trace( "The song file '%s' is has %d fields in a #NOTES tag, but should have at least %d.", sPath.c_str(), iNumParams, 7 );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Steps* pNewNotes = new Steps;
|
||||||
|
ASSERT( pNewNotes );
|
||||||
|
|
||||||
LoadFromSMTokens(
|
LoadFromSMTokens(
|
||||||
sParams[1],
|
sParams[1],
|
||||||
sParams[2],
|
sParams[2],
|
||||||
@@ -447,15 +447,15 @@ bool SMLoader::LoadEdit( CString sEditFilePath, ProfileSlot slot )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Steps* pNewNotes = new Steps;
|
|
||||||
ASSERT( pNewNotes );
|
|
||||||
|
|
||||||
if( iNumParams < 7 )
|
if( iNumParams < 7 )
|
||||||
{
|
{
|
||||||
LOG->Trace( "The song file '%s' is has %d fields in a #NOTES tag, but should have at least %d.", sEditFilePath.c_str(), iNumParams, 7 );
|
LOG->Trace( "The song file '%s' is has %d fields in a #NOTES tag, but should have at least %d.", sEditFilePath.c_str(), iNumParams, 7 );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Steps* pNewNotes = new Steps;
|
||||||
|
ASSERT( pNewNotes );
|
||||||
|
|
||||||
LoadFromSMTokens(
|
LoadFromSMTokens(
|
||||||
sParams[1], sParams[2], sParams[3], sParams[4], sParams[5], sParams[6],
|
sParams[1], sParams[2], sParams[3], sParams[4], sParams[5], sParams[6],
|
||||||
*pNewNotes);
|
*pNewNotes);
|
||||||
|
|||||||
Reference in New Issue
Block a user