]> git.sesse.net Git - ffmpeg/commit
avcodec/svq3: Fix memleaks upon allocation error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 13 Sep 2020 00:45:38 +0000 (02:45 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 16 Sep 2020 22:09:08 +0000 (00:09 +0200)
commit64a64d47c0afd2a0517375345fe7df61abfc89c0
tree1edc39e5baaf2a601ce8666d4f4d1b513de6ebaa
parent96061c5a4f690c3ab49e4458701bb013fd3dd57f
avcodec/svq3: Fix memleaks upon allocation error

Commit b2361cfb94738298a6c4037cc348fe5015efb841e made all of the
error paths in svq3_decode_init() call svq3_decode_end(); yet several
new error paths that were added later (in merges from Libav) returned
directly without cleaning up properly. This commit fixes the resulting
potential memleaks by setting the FF_CODEC_CAP_INIT_CLEANUP flag. This
also allows to simplify freeing by returning directly.

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