aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2011-08-20 21:30:03 +1000
committerPaul Gilbert2011-08-20 21:30:03 +1000
commit472d2ef9a30e43e4c4f1818da0cfa0122f7a9982 (patch)
tree4956cf1d58019be7a1c7269027683268617c6403 /engines
parent6cab258032b72054f901d4a19a85ac6ef8ef4513 (diff)
downloadscummvm-rg350-472d2ef9a30e43e4c4f1818da0cfa0122f7a9982.tar.gz
scummvm-rg350-472d2ef9a30e43e4c4f1818da0cfa0122f7a9982.tar.bz2
scummvm-rg350-472d2ef9a30e43e4c4f1818da0cfa0122f7a9982.zip
TSAGE: Fix memory leak of sound voiceType list
Diffstat (limited to 'engines')
-rw-r--r--engines/tsage/sound.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index 7c8dc83fe9..0b77628801 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -71,6 +71,14 @@ SoundManager::~SoundManager() {
// g_system->getTimerManager()->removeTimerProc(_sfUpdateCallback);
}
+ // Free any allocated voice type structures
+ for (int idx = 0; idx < SOUND_ARR_SIZE; ++idx) {
+ if (sfManager()._voiceTypeStructPtrs[idx]) {
+ delete sfManager()._voiceTypeStructPtrs[idx];
+ sfManager()._voiceTypeStructPtrs[idx] = NULL;
+ }
+ }
+
_soundManager = NULL;
}