[Scummvm-cvs-logs] scummvm master -> 404076dcbea4a6b8a1dc0eec3f4bcbb75296bdd5
dreammaster
dreammaster at scummvm.org
Sun Oct 11 22:52:22 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
404076dcbe SHERLOCK: RT: Fix frame memory leak in StreamingImageFile
Commit: 404076dcbea4a6b8a1dc0eec3f4bcbb75296bdd5
https://github.com/scummvm/scummvm/commit/404076dcbea4a6b8a1dc0eec3f4bcbb75296bdd5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-10-11T16:51:49-04:00
Commit Message:
SHERLOCK: RT: Fix frame memory leak in StreamingImageFile
Changed paths:
engines/sherlock/image_file.cpp
diff --git a/engines/sherlock/image_file.cpp b/engines/sherlock/image_file.cpp
index 1a1f295..a1636e9 100644
--- a/engines/sherlock/image_file.cpp
+++ b/engines/sherlock/image_file.cpp
@@ -1049,6 +1049,7 @@ void StreamingImageFile::close() {
_stream = nullptr;
_frameNumber = -1;
_active = false;
+ _imageFrame._frame.free();
}
bool StreamingImageFile::getNextFrame() {
@@ -1079,6 +1080,9 @@ bool StreamingImageFile::getNextFrame() {
_imageFrame._size = frameStream->readUint16LE() - 11;
_imageFrame._rleMarker = frameStream->readByte();
+ // Free the previous frame
+ _imageFrame._frame.free();
+
// Decode the frame
if (_compressed) {
delete frameStream;
More information about the Scummvm-git-logs
mailing list