aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-03-13 11:52:16 +0000
committerTravis Howell2006-03-13 11:52:16 +0000
commitb8cf88622b5a50d46702a9bdfd30ee2e4328c1f8 (patch)
treea4aeeb272015d7bf8afe11f2f6228b57d05a7b7c
parentc5d90e026fcf46b7b566220acc1c5303073c020c (diff)
downloadscummvm-rg350-b8cf88622b5a50d46702a9bdfd30ee2e4328c1f8.tar.gz
scummvm-rg350-b8cf88622b5a50d46702a9bdfd30ee2e4328c1f8.tar.bz2
scummvm-rg350-b8cf88622b5a50d46702a9bdfd30ee2e4328c1f8.zip
Fix a few valgrind warnings
svn-id: r21258
-rw-r--r--engines/lure/game.cpp2
-rw-r--r--engines/lure/menu.cpp2
-rw-r--r--engines/lure/res.cpp2
-rw-r--r--engines/lure/room.cpp1
4 files changed, 4 insertions, 3 deletions
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp
index 7c8fc98c1d..a58dba2d19 100644
--- a/engines/lure/game.cpp
+++ b/engines/lure/game.cpp
@@ -69,7 +69,7 @@ void Game::nextFrame() {
hotspot->tick();
}
- delete idList;
+ delete[] idList;
Screen::getReference().update();
}
diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp
index 8051e14fac..2f881934cc 100644
--- a/engines/lure/menu.cpp
+++ b/engines/lure/menu.cpp
@@ -58,7 +58,7 @@ MenuRecord::MenuRecord(uint16 hsxstartVal, uint16 hsxendVal, uint16 xstartVal,
}
MenuRecord::~MenuRecord() {
- delete _entries[0]; // Delete string data for all the menu items
+ free(_entries[0]); // Delete string data for all the menu items
free(_entries); // Free the list
}
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 2b4e7fd180..cca901a334 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -55,7 +55,7 @@ void Resources::freeData() {
delete _paletteSubset;
delete _scriptData;
delete _script2Data;
- delete _hotspotScriptData;
+ free(_hotspotScriptData);
delete _messagesData;
delete _cursors;
}
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index e27f9cfbdb..6346181cc0 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -76,6 +76,7 @@ Room::Room(): _screen(Screen::getReference()) {
_roomData = NULL;
_talkDialog = NULL;
+ _hotspotId = 0;
_hotspotName[0] = '\0';
for (int ctr = 0; ctr < MAX_NUM_LAYERS; ++ctr) _layers[ctr] = NULL;
_numLayers = 0;