diff options
author | David Turner | 2011-01-22 05:21:51 +0000 |
---|---|---|
committer | David Turner | 2011-01-22 05:21:51 +0000 |
commit | 243fe811ef7d5be175ea27fa73b3eb2d6e0a53e8 (patch) | |
tree | 19dd31a858d498428e37965d8d35d40ab63d2f11 | |
parent | d99ca6e58c6e3f4d409edac08b9b703557cd2b61 (diff) | |
download | scummvm-rg350-243fe811ef7d5be175ea27fa73b3eb2d6e0a53e8.tar.gz scummvm-rg350-243fe811ef7d5be175ea27fa73b3eb2d6e0a53e8.tar.bz2 scummvm-rg350-243fe811ef7d5be175ea27fa73b3eb2d6e0a53e8.zip |
TOON: Fix Further Memory Leaks in Savegame Loading.
svn-id: r55408
-rw-r--r-- | engines/toon/toon.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index b54b3a7f1d..7478ed67f1 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -92,7 +92,7 @@ void ToonEngine::init() { _currentTextLineY = 0; _currentTextLineCharacterId = 0; - _saveBufferStream = new Common::MemoryWriteStreamDynamic(); + _saveBufferStream = new Common::MemoryWriteStreamDynamic(DisposeAfterUse::YES); _firstFrame = false; @@ -3210,8 +3210,8 @@ bool ToonEngine::loadGame(int32 slot) { break; } } - _saveBufferStream->write(buf, size); + delete[] buf; } delete loadFile; return true; |