aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJordi Vilalta Prat2011-01-07 17:44:20 +0000
committerJordi Vilalta Prat2011-01-07 17:44:20 +0000
commit2f7c04e54b74f82e7005b09d634c1ceba7ada424 (patch)
tree72227e28f55a322d51363d915801a971416f511d /engines
parent176be9adaddaf3ff48d3cb046e221b3984c6725e (diff)
downloadscummvm-rg350-2f7c04e54b74f82e7005b09d634c1ceba7ada424.tar.gz
scummvm-rg350-2f7c04e54b74f82e7005b09d634c1ceba7ada424.tar.bz2
scummvm-rg350-2f7c04e54b74f82e7005b09d634c1ceba7ada424.zip
GROOVIE: Fix a memory leak reported by cppcheck.
svn-id: r55150
Diffstat (limited to 'engines')
-rw-r--r--engines/groovie/font.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/groovie/font.cpp b/engines/groovie/font.cpp
index b9d6dbf687..92ebcce298 100644
--- a/engines/groovie/font.cpp
+++ b/engines/groovie/font.cpp
@@ -71,8 +71,10 @@ bool T7GFont::load(Common::SeekableReadStream &stream) {
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;
}