]> git.sesse.net Git - ffmpeg/commit
avcodec/qtrleenc: Fix memleak upon allocation failure
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 12 Sep 2020 21:52:36 +0000 (23:52 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 16 Sep 2020 22:09:08 +0000 (00:09 +0200)
commit2a71cbeb019fabd70f04ca9d2ec5d0bff3b3e3d2
treebdf1edeac485fcd7ac87f5d3bd720409ff01e7b1
parent4db4e69512a933f38d99b10df58431b9fed3e584
avcodec/qtrleenc: Fix memleak upon allocation failure

The qtrle encoder allocates several buffers and an AVFrame in its init
function. If one of these allocations fails, but others succeed, the
successfully allocated objects leak. This is fixed by setting the
FF_CODEC_CAP_INIT_CLEANUP flag.

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