[Scummvm-cvs-logs] scummvm master -> 9b027771557bf308d8aa92ea9c25b30be15b68d6

clone2727 clone2727 at gmail.com
Wed Sep 4 01:32:04 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 .

9b02777155 VIDEO: Fix memory leak in TrueMotion1 header buffer

Commit: 9b027771557bf308d8aa92ea9c25b30be15b68d6
Author: richiesams (adastley at gmail.com)
Date: 2013-09-03T16:24:41-07:00

Commit Message:
VIDEO: Fix memory leak in TrueMotion1 header buffer

Cleanup _buf before returning, even if we don't actually decode

Changed paths:

diff --git a/video/codecs/truemotion1.cpp b/video/codecs/truemotion1.cpp
index e475c84..720e86a 100644
--- a/video/codecs/truemotion1.cpp
+++ b/video/codecs/truemotion1.cpp
@@ -400,11 +400,14 @@ void TrueMotion1Decoder::decode16() {
 const Graphics::Surface *TrueMotion1Decoder::decodeImage(Common::SeekableReadStream *stream) {
-	if (compressionTypes[_header.compression].algorithm == ALGO_NOP)
+	if (compressionTypes[_header.compression].algorithm == ALGO_NOP) {
+		delete[] _buf;
 		return 0;
+	}
 	if (compressionTypes[_header.compression].algorithm == ALGO_RGB24H) {
 		warning("Unhandled TrueMotion1 24bpp frame");
+		delete[] _buf;
 		return 0;
 	} else

More information about the Scummvm-git-logs mailing list