mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/af_biquads: fix possible leak on error
Recently introduced.
This commit is contained in:
parent
ac7dc20a5d
commit
93a076db70
|
@ -875,8 +875,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
|
||||||
return ff_filter_frame(outlink, buf);
|
return ff_filter_frame(outlink, buf);
|
||||||
|
|
||||||
ret = av_channel_layout_copy(&s->ch_layout, &inlink->ch_layout);
|
ret = av_channel_layout_copy(&s->ch_layout, &inlink->ch_layout);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
av_frame_free(&buf);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
if (strcmp(s->ch_layout_str, "all"))
|
if (strcmp(s->ch_layout_str, "all"))
|
||||||
av_channel_layout_from_string(&s->ch_layout,
|
av_channel_layout_from_string(&s->ch_layout,
|
||||||
s->ch_layout_str);
|
s->ch_layout_str);
|
||||||
|
|
Loading…
Reference in New Issue