[FFmpeg-devel] [PATCHv2 2/2] avcoded/fft: Fix memory leak if ctx2 is used

Sebastian Ramacher sramacher at debian.org
Sun Nov 12 19:46:28 EET 2023


---
 libavcodec/avfft.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/avfft.c b/libavcodec/avfft.c
index 3ef076d222..999b5ed79a 100644
--- a/libavcodec/avfft.c
+++ b/libavcodec/avfft.c
@@ -130,6 +130,7 @@ av_cold void av_mdct_end(FFTContext *s)
 {
     if (s) {
         AVTXWrapper *w = (AVTXWrapper *)s;
+        av_tx_uninit(&w->ctx2);
         av_tx_uninit(&w->ctx);
         av_free(w);
     }
-- 
2.42.0



More information about the ffmpeg-devel mailing list