aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/midi/adlib.cpp2
-rw-r--r--scumm/instrument.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/backends/midi/adlib.cpp b/backends/midi/adlib.cpp
index 39349a6220..b89d09c2b2 100644
--- a/backends/midi/adlib.cpp
+++ b/backends/midi/adlib.cpp
@@ -877,6 +877,8 @@ void MidiDriver_ADLIB::close() {
// Turn off the OPL emulation
YM3812Shutdown();
+
+ free(_adlib_reg_cache);
_isOpen = false;
}
diff --git a/scumm/instrument.h b/scumm/instrument.h
index 84b45771d7..8116af1d25 100644
--- a/scumm/instrument.h
+++ b/scumm/instrument.h
@@ -52,6 +52,7 @@ public:
};
Instrument() : _type (0), _instrument (0) { }
+ ~Instrument() { delete _instrument; }
static void nativeMT32 (bool native);
void clear();