aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/mixer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index f1cab83ff7..201b848f8f 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -60,6 +60,8 @@ int SoundMixer::append(int index, void *sound, uint32 size, uint rate, byte flag
chan = _channels[index];
} else {
chan->append(sound, size);
+ if (flags & FLAG_AUTOFREE)
+ free(sound);
}
_syst->unlock_mutex(_mutex);