Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-29 19:50:07 +0400
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-29 19:50:07 +0400
commit225f78b7ef589e52bbbb19c97d36de5b27982702 (patch)
treee45dabb3404c183c5dc64ca49d5a56bc67c50c09 /libavcodec/ac3enc.c
parent90bd75e6eb789d196fef0135a58bcfe7904c65c5 (diff)
Avoid a null pointer dereference on clean-up after oom in ac3 encoder.
Diffstat (limited to 'libavcodec/ac3enc.c')
-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);