aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2018-10-07 22:47:19 +0200
committerMarton Balint <cus@passwd.hu>2018-10-09 21:46:28 +0200
commitd6a1f711bcd1035bea95157ae6559988000e453d (patch)
treee88e1c42b3a9eb6acc045fae151ab949d9a60c26
parent6e6ecdf44d621ee450bfeed008618cd5544187bb (diff)
downloadffmpeg-d6a1f711bcd1035bea95157ae6559988000e453d.tar.gz
avfilter/af_asetnsamples: do not leak frame on ENOMEM
Fixes Coverity CID 1416352. Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--libavfilter/af_asetnsamples.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/af_asetnsamples.c b/libavfilter/af_asetnsamples.c
index 30fabede26..e8daec8d8f 100644
--- a/libavfilter/af_asetnsamples.c
+++ b/libavfilter/af_asetnsamples.c
@@ -71,8 +71,10 @@ static int activate(AVFilterContext *ctx)
return ff_filter_frame(outlink, frame);
pad_frame = ff_get_audio_buffer(outlink, s->nb_out_samples);
- if (!pad_frame)
+ if (!pad_frame) {
+ av_frame_free(&frame);
return AVERROR(ENOMEM);
+ }
av_samples_copy(pad_frame->extended_data, frame->extended_data,
0, 0, frame->nb_samples, frame->channels, frame->format);