diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-15 02:44:36 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-15 19:25:26 +0200 |
commit | a53f32cf49a0206f39e38a8fc7915010399ea047 (patch) | |
tree | 55e118094755e743683732effcd3796484fd62c8 /libavcodec/mobiclip.c | |
parent | a8ebb5632018adad733f89fa4efe74d7e92155ac (diff) |
avcodec/mobiclip: 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>
Diffstat (limited to 'libavcodec/mobiclip.c')
-rw-r--r-- | libavcodec/mobiclip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index 25a7f0ed14..8758e7f617 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@ -1436,4 +1436,5 @@ AVCodec ff_mobiclip_decoder = { .flush = mobiclip_flush, .close = mobiclip_close, .capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; |