aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/zvision/events.cpp2
-rw-r--r--engines/zvision/render_manager.cpp2
-rw-r--r--engines/zvision/utility.cpp2
-rw-r--r--engines/zvision/video.cpp2
4 files changed, 6 insertions, 2 deletions
diff --git a/engines/zvision/events.cpp b/engines/zvision/events.cpp
index a3d6b6b670..afa2d95207 100644
--- a/engines/zvision/events.cpp
+++ b/engines/zvision/events.cpp
@@ -65,7 +65,7 @@ void ZVision::processEvents() {
initGraphics(_width, _height, true, &_pixelFormat);
delete _currentVideo;
_currentVideo = 0;
- delete _scaledVideoFrameBuffer;
+ delete[] _scaledVideoFrameBuffer;
_scaledVideoFrameBuffer = 0;
}
break;
diff --git a/engines/zvision/render_manager.cpp b/engines/zvision/render_manager.cpp
index 671e7c0136..6d3f7c6fc1 100644
--- a/engines/zvision/render_manager.cpp
+++ b/engines/zvision/render_manager.cpp
@@ -59,6 +59,8 @@ void RenderManager::renderImageToScreen(const Common::String &fileName, uint32 x
stream.read(buffer, decompressedSize);
_system->copyRectToScreen(buffer, width * 2, x, y, width, height);
+
+ delete[] buffer;
} else {
// Reset the cursor
file.seek(0);
diff --git a/engines/zvision/utility.cpp b/engines/zvision/utility.cpp
index bf8e5c91d6..fa29fe660f 100644
--- a/engines/zvision/utility.cpp
+++ b/engines/zvision/utility.cpp
@@ -225,6 +225,8 @@ void convertRawToWav(const Common::String &inputFile, ZVision *engine, const Com
int16 *buffer = new int16[file.size()];
int readBytes = audioStream->readBuffer(buffer, file.size());
output.write(buffer, file.size() * 2);
+
+ delete[] buffer;
}
} // End of namespace ZVision
diff --git a/engines/zvision/video.cpp b/engines/zvision/video.cpp
index 0cca486af6..0428090003 100644
--- a/engines/zvision/video.cpp
+++ b/engines/zvision/video.cpp
@@ -118,7 +118,7 @@ void ZVision::continueVideo() {
initGraphics(_width, _height, true, &_pixelFormat);
delete _currentVideo;
_currentVideo = 0;
- delete _scaledVideoFrameBuffer;
+ delete[] _scaledVideoFrameBuffer;
_scaledVideoFrameBuffer = 0;
}