Browse Source

audio: Fix memory leak in OpenAL

Sam Edwards 7 years ago
parent
commit
8a7b47d501
1 changed files with 1 additions and 0 deletions
  1. 1 0
      panda/src/audiotraits/openalAudioManager.cxx

+ 1 - 0
panda/src/audiotraits/openalAudioManager.cxx

@@ -443,6 +443,7 @@ get_sound_data(MovieAudio *movie, int mode) {
     alBufferData(sd->_sample,
                  (channels>1) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16,
                  data, samples * channels * 2, stream->audio_rate());
+    delete[] data;
     int err = alGetError();
     if (err != AL_NO_ERROR) {
       audio_error("could not fill OpenAL buffer object with data");