diff options
author | Paul Gilbert | 2016-07-12 18:27:33 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-17 13:09:34 -0400 |
commit | b843b2fd3385533955a325ff8819e37ab3b0b2f0 (patch) | |
tree | 1fad7a94f7f6776e174e39bf5aece089ea4696da | |
parent | 1986fa6e83884688a62c0cfbfb9109fcd26fac6e (diff) | |
download | scummvm-rg350-b843b2fd3385533955a325ff8819e37ab3b0b2f0.tar.gz scummvm-rg350-b843b2fd3385533955a325ff8819e37ab3b0b2f0.tar.bz2 scummvm-rg350-b843b2fd3385533955a325ff8819e37ab3b0b2f0.zip |
TITANIC: Fix memory leak in image decoders
-rw-r--r-- | engines/titanic/support/image_decoders.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/titanic/support/image_decoders.cpp b/engines/titanic/support/image_decoders.cpp index 4203dad97c..495d1d0982 100644 --- a/engines/titanic/support/image_decoders.cpp +++ b/engines/titanic/support/image_decoders.cpp @@ -45,6 +45,7 @@ void CJPEGDecode::decode(OSVideoSurface &surface, const CString &name) { Common::copy((byte *)convertedSurface->getPixels(), (byte *)convertedSurface->getPixels() + surface.getPitch() * surface.getHeight(), (byte *)surface._rawSurface->getPixels()); + convertedSurface->free(); delete convertedSurface; surface.unlock(); } @@ -72,6 +73,7 @@ void CTargaDecode::decode(OSVideoSurface &surface, const CString &name) { Common::copy((byte *)convertedSurface->getPixels(), (byte *)convertedSurface->getPixels() + surface.getPitch() * surface.getHeight(), (byte *)surface._rawSurface->getPixels()); + convertedSurface->free(); delete convertedSurface; surface.unlock(); } |