Re: [FFmpeg-devel] [PATCH] avcodec/utils, avcodec_open2: close codec on failure

2019-07-10 Thread Michael Niedermayer
On Tue, Jul 09, 2019 at 07:03:58PM -0700, James Zern wrote: > after a successful init if the function fails for another reason close > the codec without requiring FF_CODEC_CAP_INIT_CLEANUP which is meant to > cover init failures themselves. fixes a memory leak in those cases. > >

[FFmpeg-devel] [PATCH] avcodec/utils, avcodec_open2: close codec on failure

2019-07-09 Thread James Zern
after a successful init if the function fails for another reason close the codec without requiring FF_CODEC_CAP_INIT_CLEANUP which is meant to cover init failures themselves. fixes a memory leak in those cases. BUG=oss-fuzz:15529 Signed-off-by: James Zern --- libavcodec/utils.c | 5 - 1