Commit 44b55a8c authored by Jun Zhao's avatar Jun Zhao

lavfi/anequalizer: fix memory leak in error handling path

free the pad.name in error handling path to avoid memory leak.
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
parent 4ce1e13b
......@@ -205,8 +205,10 @@ static av_cold int init(AVFilterContext *ctx)
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_video,
};
if (!vpad.name)
if (!vpad.name) {
av_freep(&pad.name);
return AVERROR(ENOMEM);
}
}
ret = ff_insert_outpad(ctx, 0, &pad);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment