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>
pull/351/head
Andreas Rheinhardt 4 years ago
parent a8ebb56320
commit a53f32cf49
  1. 1
      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,
};

Loading…
Cancel
Save