From 17b0144402a9e74c51ba6d2c6e223f67adf03e59 Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Tue, 27 May 2008 23:26:48 +0000 Subject: CINE: Fixed two memory leaks when shutting down the CINE engine svn-id: r32332 --- engines/cine/cine.cpp | 4 +++- engines/cine/sound.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/cine') diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp index 41dd9be16f..52474d13a9 100644 --- a/engines/cine/cine.cpp +++ b/engines/cine/cine.cpp @@ -42,7 +42,6 @@ #include "cine/sound.h" #include "cine/various.h" - namespace Cine { Sound *g_sound; @@ -70,6 +69,9 @@ CineEngine::~CineEngine() { freeErrmessDat(); } Common::clearAllSpecialDebugLevels(); + + free(partBuffer); + free(textDataPtr); } int CineEngine::init() { diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp index e808de6922..f26032fe98 100644 --- a/engines/cine/sound.cpp +++ b/engines/cine/sound.cpp @@ -249,6 +249,7 @@ AdlibSoundDriver::AdlibSoundDriver(Audio::Mixer *mixer) AdlibSoundDriver::~AdlibSoundDriver() { _mixer->stopHandle(_soundHandle); + OPLDestroy(_opl); } void AdlibSoundDriver::setupChannel(int channel, const byte *data, int instrument, int volume) { -- cgit v1.2.3