diff options
author | D G Turner | 2012-03-28 01:51:56 +0100 |
---|---|---|
committer | D G Turner | 2012-03-28 01:51:56 +0100 |
commit | b01d712a63a1a6de4e0376fed1f2b7ef8829d17f (patch) | |
tree | 19137d8341489d0ee0601d19e75ae5785dcff08e | |
parent | 6523a32334491532a7fe6f9efd96585d4d1188ce (diff) | |
download | scummvm-rg350-b01d712a63a1a6de4e0376fed1f2b7ef8829d17f.tar.gz scummvm-rg350-b01d712a63a1a6de4e0376fed1f2b7ef8829d17f.tar.bz2 scummvm-rg350-b01d712a63a1a6de4e0376fed1f2b7ef8829d17f.zip |
CGE: Close memory leak in savegame loading.
-rw-r--r-- | engines/cge/cge_main.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index 27bc47b651..05a94df606 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -216,6 +216,7 @@ bool CGEEngine::loadGame(int slotNumber, SavegameHeader *header, bool tiny) { byte *dataBuffer = (byte *)malloc(size); saveFile->read(dataBuffer, size); readStream = new Common::MemoryReadStream(dataBuffer, size, DisposeAfterUse::YES); + delete saveFile; } // Check to see if it's a ScummVM savegame or not |