[Scummvm-git-logs] scummvm master -> 0c6496b111a116966da974f3e7bd61fb7756dd1d

eriktorbjorn eriktorbjorn at telia.com
Sun Aug 13 16:21:15 CEST 2017


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8aeeacf204 TITANIC: Add missing va_end() on early return (CppCheck warning)
0c6496b111 BLADERUNNER: Fix potential memory leak (CppCheck warning)


Commit: 8aeeacf204db92e14df1e7b12f66f8c292e6e3e0
    https://github.com/scummvm/scummvm/commit/8aeeacf204db92e14df1e7b12f66f8c292e6e3e0
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2017-08-13T16:15:18+02:00

Commit Message:
TITANIC: Add missing va_end() on early return (CppCheck warning)

Changed paths:
    engines/titanic/support/simple_file.cpp


diff --git a/engines/titanic/support/simple_file.cpp b/engines/titanic/support/simple_file.cpp
index 65d2c85..103f062 100644
--- a/engines/titanic/support/simple_file.cpp
+++ b/engines/titanic/support/simple_file.cpp
@@ -424,8 +424,10 @@ bool SimpleFile::scanf(const char *format, ...) {
 			formatStr.deleteChar(0);
 
 			safeRead(&c, 1);
-			if (!Common::isSpace(c))
+			if (!Common::isSpace(c)) {
+				va_end(va);
 				return false;
+			}
 
 			// Skip over whitespaces
 			skipSpaces();


Commit: 0c6496b111a116966da974f3e7bd61fb7756dd1d
    https://github.com/scummvm/scummvm/commit/0c6496b111a116966da974f3e7bd61fb7756dd1d
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2017-08-13T16:20:50+02:00

Commit Message:
BLADERUNNER: Fix potential memory leak (CppCheck warning)

Changed paths:
    engines/bladerunner/vqa_decoder.cpp


diff --git a/engines/bladerunner/vqa_decoder.cpp b/engines/bladerunner/vqa_decoder.cpp
index c43e4c3..3772517 100644
--- a/engines/bladerunner/vqa_decoder.cpp
+++ b/engines/bladerunner/vqa_decoder.cpp
@@ -493,8 +493,10 @@ bool VQADecoder::readLNIN(Common::SeekableReadStream *s, uint32 size) {
 	}
 
 	readIFFChunkHeader(_s, &chd);
-	if (chd.id != kLNID)
+	if (chd.id != kLNID) {
+		free(loopNameOffsets);
 		return false;
+	}
 
 	char *names = (char*)malloc(roundup(chd.size));
 	s->read(names, roundup(chd.size));





More information about the Scummvm-git-logs mailing list