aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-29 18:27:52 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-29 19:16:49 +0200
commita2e50fa068dc586d5ab50e02bcd049eb702ccf47 (patch)
tree2894e7bc12980d37ca218993820e6d0d4b524b0f /libavcodec
parent2fa89b27365b1e474d8d2047036c8a8f1377bfe0 (diff)
parent225f78b7ef589e52bbbb19c97d36de5b27982702 (diff)
downloadffmpeg-a2e50fa068dc586d5ab50e02bcd049eb702ccf47.tar.gz
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master: Avoid a null pointer dereference on clean-up after oom in ac3 encoder. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-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);