[Scummvm-cvs-logs] scummvm master -> 1841d184979e22741905cf1ebe643eaedf822338

wjp wjp at usecode.org
Thu Apr 25 23:24:33 CEST 2013


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:
1841d18497 TOON: Fix memory leak


Commit: 1841d184979e22741905cf1ebe643eaedf822338
    https://github.com/scummvm/scummvm/commit/1841d184979e22741905cf1ebe643eaedf822338
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-04-25T14:22:55-07:00

Commit Message:
TOON: Fix memory leak

Changed paths:
    engines/toon/anim.cpp



diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp
index 1c85a8d..a674456 100644
--- a/engines/toon/anim.cpp
+++ b/engines/toon/anim.cpp
@@ -78,8 +78,10 @@ bool Animation::loadAnimation(const Common::String &file) {
 		delete[] _frames;
 		_frames = new AnimationFrame[_numFrames];
 		for (int32 e = 0; e < _numFrames; e++) {
-			if (READ_LE_UINT32(data) != 0x12345678)
+			if (READ_LE_UINT32(data) != 0x12345678) {
+				delete[] finalBuffer;
 				return false;
+			}
 
 			int32 oldRef = READ_LE_UINT32(data + 4);
 			uint32 compressedSize = READ_LE_UINT32(data + 8);






More information about the Scummvm-git-logs mailing list