mirror of https://git.ffmpeg.org/ffmpeg.git
lavfi/anequalizer: fix memory leak in error handling path
free the pad.name in error handling path to avoid memory leak. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
This commit is contained in:
parent
4ce1e13b54
commit
44b55a8c9c
|
@ -205,8 +205,10 @@ static av_cold int init(AVFilterContext *ctx)
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.config_props = config_video,
|
.config_props = config_video,
|
||||||
};
|
};
|
||||||
if (!vpad.name)
|
if (!vpad.name) {
|
||||||
|
av_freep(&pad.name);
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ff_insert_outpad(ctx, 0, &pad);
|
ret = ff_insert_outpad(ctx, 0, &pad);
|
||||||
|
|
Loading…
Reference in New Issue