diff options
author | Jun Zhao <barryjzhao@tencent.com> | 2019-09-10 13:24:08 +0300 |
---|---|---|
committer | Jun Zhao <barryjzhao@tencent.com> | 2019-09-11 05:36:34 +0300 |
commit | 44b55a8c9c87cd54b404dbf0b1d716eeec5357e6 (patch) | |
tree | 7dedbd515cb0661ac1236b0ad7dbbd9669355188 /libavfilter | |
parent | 4ce1e13b546598e05832bdff55d23d2cc88f3756 (diff) |
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>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_anequalizer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c index 03d939f170..ee82474083 100644 --- a/libavfilter/af_anequalizer.c +++ b/libavfilter/af_anequalizer.c @@ -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); |