Browse Source

af_amix: prevent memory leak on error path

Fixes CID732272.
tags/n1.1
Janne Grunau 13 years ago
parent
commit
8501c09868
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavfilter/af_amix.c

+ 3
- 1
libavfilter/af_amix.c View File

@@ -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…
Cancel
Save