diff options
author | Paul Gilbert | 2012-05-05 11:15:38 +1000 |
---|---|---|
committer | Paul Gilbert | 2012-05-05 11:15:38 +1000 |
commit | e0a7b421857636d5cad2e74c971a676733e48c5b (patch) | |
tree | 81cb5be8d278d66164c69951e0da0bdd283b71b6 /engines | |
parent | 046620054f3b2817b366e3e3bc01b4a84206dd6f (diff) | |
download | scummvm-rg350-e0a7b421857636d5cad2e74c971a676733e48c5b.tar.gz scummvm-rg350-e0a7b421857636d5cad2e74c971a676733e48c5b.tar.bz2 scummvm-rg350-e0a7b421857636d5cad2e74c971a676733e48c5b.zip |
TONY: Fixed some more Valgrind identified memory leaks
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tony/game.cpp | 9 | ||||
-rw-r--r-- | engines/tony/tony.cpp | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp index b4b4253d08..1fe5956ffe 100644 --- a/engines/tony/game.cpp +++ b/engines/tony/game.cpp @@ -1412,9 +1412,12 @@ void RMPointer::Init(void) { void RMPointer::Close(void) { int i; - for (i = 0; i < 1; i++) - if (m_pointer[i] != NULL) - delete m_pointer[i], m_pointer[i] = NULL; + for (i = 0; i < 5; i++) { + if (m_pointer[i] != NULL) { + delete m_pointer[i]; + m_pointer[i] = NULL; + } + } } diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp index 9ff306ca46..f4e2f9f1c6 100644 --- a/engines/tony/tony.cpp +++ b/engines/tony/tony.cpp @@ -413,6 +413,7 @@ void TonyEngine::Close(void) { RMText::Unload(); _theEngine.Close(); m_wnd.Close(); + delete[] m_curThumbnail; } void TonyEngine::SwitchFullscreen(bool bFull) { |