[FFmpeg-devel] [PATCH 1/3] avfilter/avfilter: Fix leaks upon filter creation error

Nicolas George george at nsup.org
Wed Aug 11 11:15:47 EEST 2021


Andreas Rheinhardt (12021-08-11):
> Both the name as well as the options need to be freed.
> (Right now there is no option for the AVFilterContext itself that could
> leak, but some filters have options (e.g. of type AV_OPT_TYPE_STRING)
> that can leak.)
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

LGTM.

> I intend to remove this duplicated freeing code and call avfilter_free()
> directly once it is ensured that it is safe to do so; a few checks will
> have to be added to it and the filters will have to be checked to be
> compatible with it. The only thing I already found out is that libvamf
> is buggy (even without calling avfilter_free), because it just presumes
> that a mutex and a condition variable have always been properly
> initialized.

Useful work, thanks.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210811/7db151a4/attachment.sig>


More information about the ffmpeg-devel mailing list