aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-10-09 16:15:15 +0200
committerJanne Grunau <janne-libav@jannau.net>2012-10-09 16:15:15 +0200
commit8501c098687bbf551a2f1cdef80ee653fdfff6ac (patch)
treed2375f9f7bd6ffe5ccb6d32496ab8a64f9aba047 /libavfilter
parent6f8ef5320f4d435803482ed322f3de45e6ea125c (diff)
downloadffmpeg-8501c098687bbf551a2f1cdef80ee653fdfff6ac.tar.gz
af_amix: prevent memory leak on error path
Fixes CID732272.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_amix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 202d67541c..a0b265fa34 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -285,8 +285,10 @@ static int output_frame(AVFilterLink *outlink, int nb_samples)
return AVERROR(ENOMEM);
in_buf = ff_get_audio_buffer(outlink, AV_PERM_WRITE, nb_samples);
- if (!in_buf)
+ if (!in_buf) {
+ avfilter_unref_buffer(out_buf);
return AVERROR(ENOMEM);
+ }
for (i = 0; i < s->nb_inputs; i++) {
if (s->input_state[i] == INPUT_ON) {