diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/save/saveconverter_v2.cpp | 2 | ||||
-rw-r--r-- | engines/gob/save/saveconverter_v3.cpp | 2 | ||||
-rw-r--r-- | engines/gob/save/saveconverter_v4.cpp | 2 | ||||
-rw-r--r-- | engines/gob/save/saveconverter_v6.cpp | 2 | ||||
-rw-r--r-- | engines/lure/lure.cpp | 4 | ||||
-rw-r--r-- | engines/m4/graphics.cpp | 2 |
6 files changed, 9 insertions, 5 deletions
diff --git a/engines/gob/save/saveconverter_v2.cpp b/engines/gob/save/saveconverter_v2.cpp index 64770256e5..1260a26280 100644 --- a/engines/gob/save/saveconverter_v2.cpp +++ b/engines/gob/save/saveconverter_v2.cpp @@ -67,7 +67,7 @@ char *SaveConverter_v2::getDescription(Common::SeekableReadStream &save) const { // Read the description if (save.read(desc, kSlotNameLength) != kSlotNameLength) { - delete desc; + delete[] desc; return 0; } diff --git a/engines/gob/save/saveconverter_v3.cpp b/engines/gob/save/saveconverter_v3.cpp index 9be980249a..2f52c789c6 100644 --- a/engines/gob/save/saveconverter_v3.cpp +++ b/engines/gob/save/saveconverter_v3.cpp @@ -75,7 +75,7 @@ char *SaveConverter_v3::getDescription(Common::SeekableReadStream &save) const { // Read the description if (save.read(desc, kSlotNameLength) != kSlotNameLength) { - delete desc; + delete[] desc; return 0; } diff --git a/engines/gob/save/saveconverter_v4.cpp b/engines/gob/save/saveconverter_v4.cpp index 5096a159e4..ea5afaeebd 100644 --- a/engines/gob/save/saveconverter_v4.cpp +++ b/engines/gob/save/saveconverter_v4.cpp @@ -71,7 +71,7 @@ char *SaveConverter_v4::getDescription(Common::SeekableReadStream &save) const { // Read the description if (save.read(desc, kSlotNameLength) != kSlotNameLength) { - delete desc; + delete[] desc; return 0; } diff --git a/engines/gob/save/saveconverter_v6.cpp b/engines/gob/save/saveconverter_v6.cpp index ea2c7d1e06..a768ac5c67 100644 --- a/engines/gob/save/saveconverter_v6.cpp +++ b/engines/gob/save/saveconverter_v6.cpp @@ -67,7 +67,7 @@ char *SaveConverter_v6::getDescription(Common::SeekableReadStream &save) const { // Read the description if (save.read(desc, kSlotNameLength) != kSlotNameLength) { - delete desc; + delete[] desc; return 0; } diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp index 8e8dd27fee..7ab9a0be60 100644 --- a/engines/lure/lure.cpp +++ b/engines/lure/lure.cpp @@ -134,8 +134,10 @@ Common::Error LureEngine::go() { CopyProtectionDialog *dialog = new CopyProtectionDialog(); bool result = dialog->show(); delete dialog; - if (shouldQuit()) + if (shouldQuit()) { + delete gameInstance; return Common::kNoError; + } if (!result) error("Sorry - copy protection failed"); diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp index eb66a2e20e..9b6a841164 100644 --- a/engines/m4/graphics.cpp +++ b/engines/m4/graphics.cpp @@ -106,6 +106,8 @@ void M4Surface::loadCodesMads(Common::SeekableReadStream *source) { *ptr++ = 0; } } + + delete[] walkMap; } // Sprite related methods |