[FFmpeg-devel] [PATCH] libavcodec/videotoolbox_vp9: Move av_malloc() to avoid memory leak
Michael Niedermayer
michael at niedermayer.cc
Thu Aug 7 03:22:43 EEST 2025
On Tue, Aug 05, 2025 at 07:31:15PM +0000, Jiasheng Jiang wrote:
> Move av_malloc() after the check for subsampling to avoid memory leak if subsampling < 0 and av_malloc() succeeds.
>
> Fixes: a41a2efc85 ("lavc/videotoolbox: add VP9 hardware acceleration")
> Signed-off-by: Jiasheng Jiang <jiashengjiangcool at gmail.com>
> ---
> libavcodec/videotoolbox_vp9.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
than the original author, trying to rewrite it will not make it better.
-------------- 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/20250807/13365ade/attachment.sig>
More information about the ffmpeg-devel
mailing list