diff options
-rw-r--r-- | backends/platform/wince/CEException.cpp | 2 | ||||
-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 | ||||
-rw-r--r-- | sound/mods/tfmx.cpp | 4 |
8 files changed, 12 insertions, 8 deletions
diff --git a/backends/platform/wince/CEException.cpp b/backends/platform/wince/CEException.cpp index 4ecabece5a..421db4960c 100644 --- a/backends/platform/wince/CEException.cpp +++ b/backends/platform/wince/CEException.cpp @@ -69,7 +69,7 @@ void CEException::dumpContext(HANDLE file, HANDLE hProcess, CONTEXT *context) { if (ReadProcessMemory(hProcess, (LPCVOID)(context->Pc - (sizeof(memoryDump) / 2)), memoryDump, sizeof(memoryDump), &size)) { for (i=0; i<size; i+=8) { int j; - char digit[3]; + char digit[4]; int max; max = size - i; if (max > 8) 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 diff --git a/sound/mods/tfmx.cpp b/sound/mods/tfmx.cpp index 2ef7d79b7a..50cc68eb6b 100644 --- a/sound/mods/tfmx.cpp +++ b/sound/mods/tfmx.cpp @@ -887,7 +887,7 @@ const int8 *Tfmx::loadSampleFile(uint32 &sampleLen, Common::SeekableReadStream & sampleAlloc[0] = sampleAlloc[1] = sampleAlloc[2] = sampleAlloc[3] = 0; sampleLen = sampleSize; } else { - delete sampleAlloc; + delete[] sampleAlloc; warning("Tfmx: Encountered IO-Error"); return 0; } @@ -994,7 +994,7 @@ const Tfmx::MdatResource *Tfmx::loadMdatFile(Common::SeekableReadStream &musicDa resource->mdatData = mdatAlloc - mdatOffset; resource->mdatLen = mdatSize; } else { - delete mdatAlloc; + delete[] mdatAlloc; warning("Tfmx: Encountered IO-Error"); delete resource; return 0; |