aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-15 12:29:35 +0200
committerEugene Sandulenko2016-05-15 12:29:35 +0200
commit20433e3476f9a6c6e22ba8f11e8963b2c78a03bb (patch)
tree68ef91232cf54f08f79d31c12548494efa59b171
parent33184e822dfdbc083c472cba5e1bf4f0f9a25243 (diff)
downloadscummvm-rg350-20433e3476f9a6c6e22ba8f11e8963b2c78a03bb.tar.gz
scummvm-rg350-20433e3476f9a6c6e22ba8f11e8963b2c78a03bb.tar.bz2
scummvm-rg350-20433e3476f9a6c6e22ba8f11e8963b2c78a03bb.zip
ACCESS: Plug memory leak
-rw-r--r--engines/access/char.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/access/char.cpp b/engines/access/char.cpp
index cbe1d5d3d9..f6d3033b1b 100644
--- a/engines/access/char.cpp
+++ b/engines/access/char.cpp
@@ -44,7 +44,7 @@ CharEntry::CharEntry(const byte *data, AccessEngine *vm) {
if (vm->getGameID() == GType_MartianMemorandum) {
int lastColor = s.readUint16LE();
_numColors = lastColor - _startColor;
- } else
+ } else
_numColors = s.readUint16LE();
// Load cells
@@ -131,6 +131,7 @@ void CharManager::loadChar(int charId) {
if (ce._animFile._fileNum != -1) {
Resource *data = _vm->_files->loadFile(ce._animFile);
_vm->_animation->loadAnimations(data);
+ delete data;
}
// Load script data