aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2008-07-10 11:28:51 +0000
committerJohannes Schickel2008-07-10 11:28:51 +0000
commit9a34ef702de478611718bc94b4d1bcfc6a922613 (patch)
tree51f9cc4974e98ce1343059c5e9af06b823aa5fd1 /engines
parent092d9f38c5080da66b4edc2ec52a204448ab9a4f (diff)
downloadscummvm-rg350-9a34ef702de478611718bc94b4d1bcfc6a922613.tar.gz
scummvm-rg350-9a34ef702de478611718bc94b4d1bcfc6a922613.tar.bz2
scummvm-rg350-9a34ef702de478611718bc94b4d1bcfc6a922613.zip
Fixed mem leak in MIDI related code.
svn-id: r32987
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/sound.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index c768255272..5068268d99 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -243,8 +243,10 @@ int SoundMidiPC::open() {
}
void SoundMidiPC::close() {
- if (_driver)
+ if (_driver) {
_driver->close();
+ delete _driver;
+ }
_driver = 0;
}