mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
af_amix: prevent memory leak on error path
Fixes CID732272.
This commit is contained in:
parent
6f8ef5320f
commit
8501c09868
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user