On 14/09/18 08:25, Linjie Fu wrote: > If vaEndPicture failed in ff_vaapi_decode_issue, free > the pic->slice_buffer. > > Fix the memory leak issue in ticket #7385 > > Signed-off-by: Linjie Fu <linjie...@intel.com> > --- > libavcodec/vaapi_decode.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c > index d0a6b5817d..700cd5c681 100644 > --- a/libavcodec/vaapi_decode.c > +++ b/libavcodec/vaapi_decode.c > @@ -216,6 +216,11 @@ fail_with_picture: > fail: > ff_vaapi_decode_destroy_buffers(avctx, pic); > fail_at_end: > + pic->nb_param_buffers = 0; > + pic->nb_slices = 0; > + pic->slices_allocated = 0; > + av_freep(&pic->slice_buffers); > + > return err; > }
Makes sense, but would you mind uniting the two return paths rather than duplicating the code? Thanks, - Mark _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel