diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-22 03:51:46 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-26 23:52:56 +0200 |
commit | 7e736cd38aed1886fcc9672848ccf31ea1cc0b28 (patch) | |
tree | 00f2d0d2df5d1d2e38b4e1e1931d3f3b8c45752f | |
parent | 080d2c67f540908e48d1e0f482c057e52a7fad7a (diff) | |
download | ffmpeg-7e736cd38aed1886fcc9672848ccf31ea1cc0b28.tar.gz |
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>
-rw-r--r-- | libavfilter/vf_premultiply.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c index 1fef4777de..5d053b1f77 100644 --- a/libavfilter/vf_premultiply.c +++ b/libavfilter/vf_premultiply.c @@ -673,27 +673,19 @@ 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; |