aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sfx/softseq/amiga.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/sfx/softseq/amiga.cpp')
-rw-r--r--engines/sci/sfx/softseq/amiga.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/sfx/softseq/amiga.cpp b/engines/sci/sfx/softseq/amiga.cpp
index fba437d306..5a960ad1e0 100644
--- a/engines/sci/sfx/softseq/amiga.cpp
+++ b/engines/sci/sfx/softseq/amiga.cpp
@@ -433,7 +433,7 @@ MidiDriver_Amiga::Instrument *MidiDriver_Amiga::readInstrument(Common::File &fil
if (file.read(instrument->samples, size) < (unsigned int)size) {
warning("[sfx:seq:amiga] failed to read instrument samples");
free(instrument->samples);
- free(instrument);
+ delete instrument;
return NULL;
}
@@ -449,7 +449,7 @@ MidiDriver_Amiga::Instrument *MidiDriver_Amiga::readInstrument(Common::File &fil
if (seg_size[1] < 0) {
warning("[sfx:seq:amiga] invalid looping point");
free(instrument->samples);
- free(instrument);
+ delete instrument;
return NULL;
}