diff options
author | Janne Grunau <janne-libav@jannau.net> | 2012-10-09 18:15:15 +0400 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2012-10-09 18:15:15 +0400 |
commit | 8501c098687bbf551a2f1cdef80ee653fdfff6ac (patch) | |
tree | d2375f9f7bd6ffe5ccb6d32496ab8a64f9aba047 /libavfilter | |
parent | 6f8ef5320f4d435803482ed322f3de45e6ea125c (diff) |
af_amix: prevent memory leak on error path
Fixes CID732272.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_amix.c | 4 |
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) { |