mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 10:22:10 +00:00
lavfi/afir: fix vpad.name leak
Fix vpad.name leak in error path, move the vpad related operation only if enabled show IR frequency response. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
This commit is contained in:
parent
77e15f01fb
commit
ff8329a730
@ -876,6 +876,12 @@ static av_cold int init(AVFilterContext *ctx)
|
||||
if (!pad.name)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
ret = ff_insert_outpad(ctx, 0, &pad);
|
||||
if (ret < 0) {
|
||||
av_freep(&pad.name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (s->response) {
|
||||
vpad = (AVFilterPad){
|
||||
.name = av_strdup("filter_response"),
|
||||
@ -884,15 +890,7 @@ static av_cold int init(AVFilterContext *ctx)
|
||||
};
|
||||
if (!vpad.name)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
ret = ff_insert_outpad(ctx, 0, &pad);
|
||||
if (ret < 0) {
|
||||
av_freep(&pad.name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (s->response) {
|
||||
ret = ff_insert_outpad(ctx, 1, &vpad);
|
||||
if (ret < 0) {
|
||||
av_freep(&vpad.name);
|
||||
|
Loading…
Reference in New Issue
Block a user