]> git.sesse.net Git - ffmpeg/commit
avcodec/sonic: Fix leaks upon allocation errors
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 12 Sep 2020 23:10:40 +0000 (01:10 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 16 Sep 2020 22:09:08 +0000 (00:09 +0200)
commit7d91f9271ee336da93b6871bf3306348ac1595a7
tree9d729fb3d135e266fb6a4b8d438d6321e556d256
parent0b45ac571713cc8fda7aa5381c68ad671d21504b
avcodec/sonic: Fix leaks upon allocation errors

The Sonic decoder and encoders allocate several buffers in their init
function and return immediately if one of these allocations fails; this
will lead to leaks if there was an earlier successfull allocation. Fix
this by setting the FF_CODEC_CAP_INIT_CLEANUP flag.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/sonic.c