From 7ed9655e06c3e65847493246fb4f09851e0919d9 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 27 Nov 2018 21:11:57 +0100 Subject: [PATCH] openal: fix leak of sound data when uncache_sound on stream This is an addendum to cd2ea97b1ffb65512f5ee8ba0665f46345ef7795 (fix for #428) which did not properly delete the SoundData when uncaching sounds that were loaded as streams. --- panda/src/audiotraits/openalAudioManager.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/panda/src/audiotraits/openalAudioManager.cxx b/panda/src/audiotraits/openalAudioManager.cxx index c205f55402..edf7dfe222 100644 --- a/panda/src/audiotraits/openalAudioManager.cxx +++ b/panda/src/audiotraits/openalAudioManager.cxx @@ -553,6 +553,7 @@ uncache_sound(const Filename &file_name) { if (sd->_movie->get_filename() == path || sd->_movie->get_filename() == file_name) { exqi = _expiring_streams.erase(exqi); + delete sd; continue; } }