You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avfilter/vf_premultiply: Fix leak of names of inpads
These names leak because freeing them in the uninit function has been forgotten. Instead of adding the freeing code, this commit stops allocating these names. They are constants anyway. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
@@ -673,28 +673,20 @@ static av_cold int init(AVFilterContext *ctx)
|
||||
s->inverse = 1;
|
||||
|
||||
pad.type = AVMEDIA_TYPE_VIDEO;
|
||||
pad.name = av_strdup("main");
|
||||
pad.name = "main";
|
||||
pad.config_props = config_input;
|
||||
if (!pad.name)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if ((ret = ff_insert_inpad(ctx, 0, &pad)) < 0) {
|
||||
av_freep(&pad.name);
|
||||
if ((ret = ff_insert_inpad(ctx, 0, &pad)) < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!s->inplace) {
|
||||
pad.type = AVMEDIA_TYPE_VIDEO;
|
||||
pad.name = av_strdup("alpha");
|
||||
pad.name = "alpha";
|
||||
pad.config_props = NULL;
|
||||
if (!pad.name)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if ((ret = ff_insert_inpad(ctx, 1, &pad)) < 0) {
|
||||
av_freep(&pad.name);
|
||||
if ((ret = ff_insert_inpad(ctx, 1, &pad)) < 0)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user