[Scummvm-cvs-logs] scummvm master -> 4cac7d15112da7c25cda1ca45cc8ee95eed0716e

eriktorbjorn eriktorbjorn at telia.com
Tue May 24 07:12:10 CEST 2016


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:
4cac7d1511 GNAP: Fix memory leaks, reported by Valgrind


Commit: 4cac7d15112da7c25cda1ca45cc8ee95eed0716e
    https://github.com/scummvm/scummvm/commit/4cac7d15112da7c25cda1ca45cc8ee95eed0716e
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2016-05-24T07:09:35+02:00

Commit Message:
GNAP: Fix memory leaks, reported by Valgrind

Changed paths:
    engines/gnap/gamesys.cpp
    engines/gnap/gnap.cpp



diff --git a/engines/gnap/gamesys.cpp b/engines/gnap/gamesys.cpp
index 26af3fb..4b18fd1 100644
--- a/engines/gnap/gamesys.cpp
+++ b/engines/gnap/gamesys.cpp
@@ -65,6 +65,9 @@ GameSys::GameSys(GnapEngine *vm) : _vm(vm) {
 }
 
 GameSys::~GameSys() {
+	if (_frontSurface)
+		_frontSurface->free();
+	delete _frontSurface;
 }
 
 void GameSys::insertSequence(int sequenceId, int id, int sequenceId2, int id2, int flags, int totalDuration, int16 x, int16 y) {
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index 8acc3ee..7523cd4 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -157,6 +157,7 @@ Common::Error GnapEngine::run() {
 	_font = Graphics::loadTTFFont(*stream, 24);
 	if (!_font)
 		warning("Unable to load font");
+	delete stream;
 #else
 	_font = nullptr;
 #endif






More information about the Scummvm-git-logs mailing list