diff options
author | Filippos Karapetis | 2015-04-09 13:44:39 +0300 |
---|---|---|
committer | Filippos Karapetis | 2015-04-09 13:44:39 +0300 |
commit | ec999f1cb74dff8c42c69898bb6cbc3823b169dd (patch) | |
tree | d0c3fd1f268f788700cf719785bd5ef6133fe1d4 /engines/mads/scene_data.cpp | |
parent | 47afe424c194d5d4fd1797948b53f999473fe922 (diff) | |
download | scummvm-rg350-ec999f1cb74dff8c42c69898bb6cbc3823b169dd.tar.gz scummvm-rg350-ec999f1cb74dff8c42c69898bb6cbc3823b169dd.tar.bz2 scummvm-rg350-ec999f1cb74dff8c42c69898bb6cbc3823b169dd.zip |
MADS: Plug some memory leaks
Surfaces should be freed (to free their inner allocated surface
buffers) before being deleted
Diffstat (limited to 'engines/mads/scene_data.cpp')
-rw-r--r-- | engines/mads/scene_data.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp index d0e96be1d7..e594406447 100644 --- a/engines/mads/scene_data.cpp +++ b/engines/mads/scene_data.cpp @@ -451,6 +451,8 @@ void SceneInfo::loadMadsV2Background(int sceneId, const Common::String &resName, fab.decompress(compressedTileData, compressedTileDataSize, (byte*)newTile->getPixels(), tileWidth * tileHeight); tileSet.push_back(TileSetList::value_type(newTile)); + newTile->free(); + delete newTile; delete[] compressedTileData; } |