[FFmpeg-devel] [PATCH] swscale/utils: fix leak on threaded ctx init failure
Michael Niedermayer
michael at niedermayer.cc
Sun Jul 14 14:37:57 EEST 2024
On Tue, Jul 09, 2024 at 04:41:01PM +0200, Niklas Haas wrote:
> From: Niklas Haas <git at haasn.dev>
>
> This count gets incremented after init succeeds, when it should be
> incremented after *alloc* succeeds. Otherwise, we leak the context on
> failure.
>
> There are no negative consequences of incrementing for
> allocated-but-not-initialized contexts, as the only functions that
> reference it will, in the worst case, simply behave as if called on
> allocated-but-not-initialized contexts, which is in line with expected
> behavior when sws_init_context() fails.
> ---
> libswscale/utils.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
LGTM
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240714/99badf12/attachment.sig>
More information about the ffmpeg-devel
mailing list