diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-21 12:16:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-21 13:35:30 +0200 |
commit | b09ea25fec615c871ab8bfb00c3863aa0ce0d2c9 (patch) | |
tree | 313dada5f432e83354bf1ca6ad1e9d96b35fa077 /libavfilter | |
parent | f5ddce0753c555ac8e9d9364d4a39c5e22e39577 (diff) | |
download | ffmpeg-b09ea25fec615c871ab8bfb00c3863aa0ce0d2c9.tar.gz |
avfilter/vf_lenscorrection: fix memleak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_lenscorrection.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavfilter/vf_lenscorrection.c b/libavfilter/vf_lenscorrection.c index d30a81b033..58184b0e17 100644 --- a/libavfilter/vf_lenscorrection.c +++ b/libavfilter/vf_lenscorrection.c @@ -111,6 +111,16 @@ static int query_formats(AVFilterContext *ctx) return 0; } +static av_cold void uninit(AVFilterContext *ctx) +{ + LenscorrectionCtx *rect = ctx->priv; + int i; + + for (i = 0; i < FF_ARRAY_ELEMS(rect->correction); i++) { + av_freep(&rect->correction[i]); + } +} + static int config_props(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; @@ -214,5 +224,6 @@ AVFilter ff_vf_lenscorrection = { .inputs = lenscorrection_inputs, .outputs = lenscorrection_outputs, .priv_class = &lenscorrection_class, + .uninit = uninit, .flags = AVFILTER_FLAG_SLICE_THREADS, }; |