aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2013-04-20 16:27:59 +0200
committerWillem Jan Palenstijn2013-04-20 16:27:59 +0200
commit24b0b6aa43d1ef8e28064a69d9dde2389bec5c7d (patch)
tree5ada21771b9237bfd113f7b3534565354f750188
parent9694cbbaafcd7d043edb5755df5cc5dda18a5d16 (diff)
downloadscummvm-rg350-24b0b6aa43d1ef8e28064a69d9dde2389bec5c7d.tar.gz
scummvm-rg350-24b0b6aa43d1ef8e28064a69d9dde2389bec5c7d.tar.bz2
scummvm-rg350-24b0b6aa43d1ef8e28064a69d9dde2389bec5c7d.zip
SCI: Fix memory leak
-rw-r--r--engines/sci/resource_audio.cpp4
-rw-r--r--engines/sci/resource_intern.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 684e1a1d0d..744f05f2b9 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -75,6 +75,10 @@ AudioVolumeResourceSource::AudioVolumeResourceSource(ResourceManager *resMan, co
delete fileStream;
}
+AudioVolumeResourceSource::~AudioVolumeResourceSource() {
+ delete[] _audioCompressionOffsetMapping;
+}
+
bool Resource::loadFromWaveFile(Common::SeekableReadStream *file) {
data = new byte[size];
diff --git a/engines/sci/resource_intern.h b/engines/sci/resource_intern.h
index e8e66503d8..c256c9d156 100644
--- a/engines/sci/resource_intern.h
+++ b/engines/sci/resource_intern.h
@@ -149,6 +149,8 @@ protected:
public:
AudioVolumeResourceSource(ResourceManager *resMan, const Common::String &name, ResourceSource *map, int volNum);
+ virtual ~AudioVolumeResourceSource();
+
virtual void loadResource(ResourceManager *resMan, Resource *res);
virtual uint32 getAudioCompressionType() const;