diff options
author | Einar Johan Trøan Sømåen | 2012-06-27 22:03:15 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-27 22:03:15 +0200 |
commit | ae714dc076def8efb6448c1d39058fbabb0e096f (patch) | |
tree | a473a1ce4fb5b63491c898e2ce46b80032b08055 /engines/wintermute/Base | |
parent | dde2d92c69e73d02c185ca3390b5ba71c0cb7fa0 (diff) | |
download | scummvm-rg350-ae714dc076def8efb6448c1d39058fbabb0e096f.tar.gz scummvm-rg350-ae714dc076def8efb6448c1d39058fbabb0e096f.tar.bz2 scummvm-rg350-ae714dc076def8efb6448c1d39058fbabb0e096f.zip |
WINTERMUTE: Fix a memory leak.
Diffstat (limited to 'engines/wintermute/Base')
-rw-r--r-- | engines/wintermute/Base/BImage.cpp | 3 | ||||
-rw-r--r-- | engines/wintermute/Base/BPersistMgr.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/engines/wintermute/Base/BImage.cpp b/engines/wintermute/Base/BImage.cpp index cbe134c7c6..95f6f5bbbf 100644 --- a/engines/wintermute/Base/BImage.cpp +++ b/engines/wintermute/Base/BImage.cpp @@ -61,6 +61,9 @@ CBImage::CBImage(CBGame *inGame, FIBITMAP *bitmap): CBBase(inGame) { CBImage::~CBImage() {
/* delete _bitmap; */
delete _decoder;
+ if (_deletableSurface) {
+ _deletableSurface->free();
+ }
delete _deletableSurface;
#if 0
if (_bitmap) FreeImage_Unload(_bitmap);
diff --git a/engines/wintermute/Base/BPersistMgr.cpp b/engines/wintermute/Base/BPersistMgr.cpp index 5a70fd3729..8b037db926 100644 --- a/engines/wintermute/Base/BPersistMgr.cpp +++ b/engines/wintermute/Base/BPersistMgr.cpp @@ -93,6 +93,7 @@ void CBPersistMgr::cleanup() { _richBuffer = NULL;
_richBufferSize = 0;
+ delete[] _savedDescription;
_savedDescription = NULL; // ref to buffer
// _savedTimestamp = 0;
_savedVerMajor = _savedVerMinor = _savedVerBuild = 0;
|