[FFmpeg-devel] [PATCH 2/4] avcodec/vorbisenc: fix leak if av_mallocz failed

Michael Niedermayer michael at niedermayer.cc
Sun Jun 29 00:06:36 EEST 2025


On Fri, Jun 27, 2025 at 10:09:16PM +0800, Lidong Yan wrote:
> In put_main_header(), av_mallocz() allocates memory to local variable
> buffer, buffer leaks if av_mallocz() to *out failed. Add av_free(buffer)
> before return error code.
> 
> Signed-off-by: Lidong Yan <502024330056 at smail.nju.edu.cn>
> ---
>  libavcodec/vorbisenc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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/20250628/3db65c29/attachment.sig>


More information about the ffmpeg-devel mailing list