aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2012-05-05 11:15:38 +1000
committerPaul Gilbert2012-05-05 11:15:38 +1000
commite0a7b421857636d5cad2e74c971a676733e48c5b (patch)
tree81cb5be8d278d66164c69951e0da0bdd283b71b6 /engines
parent046620054f3b2817b366e3e3bc01b4a84206dd6f (diff)
downloadscummvm-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.cpp9
-rw-r--r--engines/tony/tony.cpp1
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) {