Skip to content

Commit d5ba012

Browse files
authored
memory leak in the Vorbis Decoder #623
1 parent 2e3905e commit d5ba012

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vorbis_decoder/vorbis_decoder.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* adapted for the ESP32 by schreibfaul1
1616
*
1717
* Created on: 13.02.2023
18-
* Updated on: 12.12.2023
18+
* Updated on: 13.12.2023
1919
*/
2020
//----------------------------------------------------------------------------------------------------------------------
2121
// O G G I M P L.
@@ -142,7 +142,7 @@ void VORBISsetDefaults(){
142142
s_f_oggContinuedPage = false;
143143
s_f_oggLastPage = false;
144144
if(s_dsp_state){vorbis_dsp_destroy(s_dsp_state); s_dsp_state = NULL;}
145-
// s_vorbisChannels = 0;
145+
s_vorbisChannels = 0;
146146
s_vorbisSamplerate = 0;
147147
s_vorbisBitRate = 0;
148148
s_vorbisSegmentLength = 0;
@@ -1665,6 +1665,7 @@ void vorbis_dsp_destroy(vorbis_dsp_state_t *v) {
16651665
}
16661666
if(v->mdctright){free(v->mdctright); v->mdctright = NULL;}
16671667
}
1668+
free(v);
16681669
}
16691670
}
16701671
//---------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)