[FFmpeg-cvslog] Avoid a null pointer dereference on clean-up after oom in ac3 encoder.

Carl Eugen Hoyos git at videolan.org
Sat Jun 29 19:17:45 CEST 2013


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Jun 29 17:50:07 2013 +0200| [225f78b7ef589e52bbbb19c97d36de5b27982702] | committer: Carl Eugen Hoyos

Avoid a null pointer dereference on clean-up after oom in ac3 encoder.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=225f78b7ef589e52bbbb19c97d36de5b27982702
---

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

diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index a0b810e..37c496c 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -2017,6 +2017,7 @@ av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
     AC3EncodeContext *s = avctx->priv_data;
 
     av_freep(&s->windowed_samples);
+    if (s->planar_samples)
     for (ch = 0; ch < s->channels; ch++)
         av_freep(&s->planar_samples[ch]);
     av_freep(&s->planar_samples);



More information about the ffmpeg-cvslog mailing list