]> git.sesse.net Git - ffmpeg/commit
avcodec/mlpenc: Fix memleak upon init failure
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 15 Sep 2020 00:35:27 +0000 (02:35 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 15 Sep 2020 17:25:26 +0000 (19:25 +0200)
commitb78031cf1670c176e97f62ad6a4865d3a44c1507
tree098f291f7885166d5b58eb2dd5721821ed133569
parentd8fc69bd6a20394adf42406bf80bd06b4c8d7384
avcodec/mlpenc: Fix memleak upon init failure

If an error happens during init after an allocation has succeeded,
the already allocated data leaked up until now. Fix this by setting the
FF_CODEC_CAP_INIT_CLEANUP flag.

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