[Scummvm-cvs-logs] SF.net SVN: scummvm:[55150] scummvm/trunk/engines/groovie/font.cpp

jvprat at users.sourceforge.net jvprat at users.sourceforge.net
Fri Jan 7 18:44:22 CET 2011


Revision: 55150
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55150&view=rev
Author:   jvprat
Date:     2011-01-07 17:44:20 +0000 (Fri, 07 Jan 2011)

Log Message:
-----------
GROOVIE: Fix a memory leak reported by cppcheck.

Modified Paths:
--------------
    scummvm/trunk/engines/groovie/font.cpp

Modified: scummvm/trunk/engines/groovie/font.cpp
===================================================================
--- scummvm/trunk/engines/groovie/font.cpp	2011-01-07 16:25:05 UTC (rev 55149)
+++ scummvm/trunk/engines/groovie/font.cpp	2011-01-07 17:44:20 UTC (rev 55150)
@@ -71,8 +71,10 @@
 	for (int i = 0; (i < numGlyphs) && !stream.eos(); i++) {
 		// Verify we're at the expected stream position
 		if (stream.pos() != glyphOffsets[i]) {
+			uint16 offset = glyphOffsets[i];
+			delete[] glyphOffsets;
 			error("Groovie::T7GFont: Glyph %d starts at %d but the current "
-				"offset is %d", i, glyphOffsets[i], stream.pos());
+				"offset is %d", i, offset, stream.pos());
 			return false;
 		}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list