aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-29 17:50:07 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-29 17:50:07 +0200
commit225f78b7ef589e52bbbb19c97d36de5b27982702 (patch)
treee45dabb3404c183c5dc64ca49d5a56bc67c50c09
parent90bd75e6eb789d196fef0135a58bcfe7904c65c5 (diff)
downloadffmpeg-225f78b7ef589e52bbbb19c97d36de5b27982702.tar.gz
Avoid a null pointer dereference on clean-up after oom in ac3 encoder.
-rw-r--r--libavcodec/ac3enc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index a0b810e0d7..37c496cd15 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);