]> git.sesse.net Git - ffmpeg/commit
avfilter/af_afir: Fix leak of AVFilterChannelLayout in case of error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 7 Aug 2020 02:58:56 +0000 (04:58 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 19 Aug 2020 22:24:03 +0000 (00:24 +0200)
commit3a0f080ffa5185f45850f15e5e7b8cf997337bf7
treef1ce7aac5c0b497fb512b0d6782255730c0264e9
parent1c7e55dd504245d71444fac1a73e5370cc76fede
avfilter/af_afir: Fix leak of AVFilterChannelLayout in case of error

If an error happens between the allocation of an AVFilterChannelLayout
and its usage (which involves attaching said object to a more permanent
object), the channel layout array leaks. This can simply be fixed by
making sure that nothing is between the allocation and the
aforementioned usage.

Fixes Coverity issue #1250334.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/af_afir.c