avfilter/af_flanger: free frame on ENOMEM
authorKyle Swanson <k@ylo.ph>
Thu, 15 Oct 2015 15:08:36 +0000 (10:08 -0500)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 18 Oct 2015 19:27:00 +0000 (21:27 +0200)
Signed-off-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/af_flanger.c

index 39d4e7b..f8ec830 100644 (file)
@@ -149,8 +149,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
         out_frame = frame;
     } else {
         out_frame = ff_get_audio_buffer(inlink, frame->nb_samples);
-        if (!out_frame)
+        if (!out_frame) {
+            av_frame_free(&frame);
             return AVERROR(ENOMEM);
+        }
         av_frame_copy_props(out_frame, frame);
     }