[FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg: fix memory leak issue.
mypopy at gmail.com
mypopy at gmail.com
Fri Jun 15 03:06:30 EEST 2018
On Thu, Jun 14, 2018 at 9:44 PM Nicolas George <george at nsup.org> wrote:
>
> Jun Zhao (2018-06-13):
> > need to call av_bprint_finalize to free the memory source to match
> > av_bprint_init.
>
> As you may have seen, in this case too, the buffer is never allocated
> dynamically.
>
> The av_bprint_finalize() already present is thus useless (I think the
> )mistake is mine), but not harmful either.
>
Yes, sometimes we didn't need to call av_bprint_finalize() because
bprint just uses a fixed buffer (1024 - size of internal filed), but
as my opinion, is it needed to recommend the caller call
av_bprint_finalize() to prevent a potential memory leak if bprint
using dynamically buffer and in fixed buffer case, call
av_bprint_finalize() is not harmful too? Just a recommendation.
>
> --
> Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list