Message ID | 20200915074000.102622-21-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | a53f32cf49a0206f39e38a8fc7915010399ea047 |
Headers | show |
Series | [FFmpeg-devel,01/30] avcodec/flashsvenc: Avoid allocation of buffer, fix memleak | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On Tue, Sep 15, 2020 at 09:39:51AM +0200, Andreas Rheinhardt wrote: > 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. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavcodec/mobiclip.c | 1 + > 1 file changed, 1 insertion(+) > ok > 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, > }; > -- > 2.25.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
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, };
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. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/mobiclip.c | 1 + 1 file changed, 1 insertion(+)