diff options
author | Bastien Bouclet | 2016-02-07 14:51:42 +0100 |
---|---|---|
committer | Bastien Bouclet | 2016-02-07 15:27:03 +0100 |
commit | bc687c72162809c8848065f46166513aeea69223 (patch) | |
tree | 885397e30c743e2fcb7158e1a2d6d5fc23438206 /engines | |
parent | 22882f54e19c1317d89e92e0578bcc94e2007e7f (diff) | |
download | scummvm-rg350-bc687c72162809c8848065f46166513aeea69223.tar.gz scummvm-rg350-bc687c72162809c8848065f46166513aeea69223.tar.bz2 scummvm-rg350-bc687c72162809c8848065f46166513aeea69223.zip |
MOHAWK: Fix two Myst resource stream memory leaks
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/myst.cpp | 2 | ||||
-rw-r--r-- | engines/mohawk/myst_graphics.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp index 91cb9a4015..9ee2cafddf 100644 --- a/engines/mohawk/myst.cpp +++ b/engines/mohawk/myst.cpp @@ -950,6 +950,8 @@ void MohawkEngine_Myst::loadHelp(uint16 id) { debugC(kDebugHelp, "\thelpText: \"%s\"", helpText.c_str()); delete[] u0; + + delete helpStream; } void MohawkEngine_Myst::loadCursorHints() { diff --git a/engines/mohawk/myst_graphics.cpp b/engines/mohawk/myst_graphics.cpp index 7cb32800a8..6c93f980ac 100644 --- a/engines/mohawk/myst_graphics.cpp +++ b/engines/mohawk/myst_graphics.cpp @@ -103,6 +103,8 @@ MohawkSurface *MystGraphics::decodeImage(uint16 id) { if (!pict.loadStream(*dataStream)) error("Could not decode Myst ME PICT"); + delete dataStream; + mhkSurface = new MohawkSurface(pict.getSurface()->convertTo(_pixelFormat)); } else { mhkSurface = _bmpDecoder->decodeImage(dataStream); |