avcodec/gif: Fix leaks upon allocation error
If one of several allocations the gif encoder performs in its init function fails, the successful allocations leak. Fix this by adding the FF_CODEC_CAP_INIT_CLEANUP flag. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit 8da8774d8eb1d5dec830f36d2e6b0ace1b16e2f5)
This commit is contained in:
parent
9c6d8ae33c
commit
9ce88b5b53
@ -497,4 +497,5 @@ AVCodec ff_gif_encoder = {
|
||||
AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8, AV_PIX_FMT_NONE
|
||||
},
|
||||
.priv_class = &gif_class,
|
||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user