This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit 4a5609206e69cb7d8f16f49f36198f0335db80ee Author: Andreas Rheinhardt <[email protected]> AuthorDate: Wed Apr 22 20:46:35 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Sun Nov 29 20:34:45 2026 +0100 avcodec/libvorbisenc: Fix leak of vorbis_comment upon error Just free it immediately and unconditionally after it is no longer needed. Signed-off-by: Andreas Rheinhardt <[email protected]> (cherry picked from commit 51c5cc0ca3fce08b521ea0fdb471e4363ce4ed87) Signed-off-by: Michael Niedermayer <[email protected]> --- libavcodec/libvorbisenc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c index 5168d7a6f0..52114ed235 100644 --- a/libavcodec/libvorbisenc.c +++ b/libavcodec/libvorbisenc.c @@ -290,8 +290,10 @@ static av_cold int libvorbis_encode_init(AVCodecContext *avctx) if (!(avctx->flags & AV_CODEC_FLAG_BITEXACT)) vorbis_comment_add_tag(&s->vc, "encoder", LIBAVCODEC_IDENT); - if ((ret = vorbis_analysis_headerout(&s->vd, &s->vc, &header, &header_comm, - &header_code))) { + ret = vorbis_analysis_headerout(&s->vd, &s->vc, &header, &header_comm, + &header_code); + vorbis_comment_clear(&s->vc); + if (ret) { ret = vorbis_error_to_averror(ret); goto error; } @@ -323,8 +325,6 @@ static av_cold int libvorbis_encode_init(AVCodecContext *avctx) return ret; } - vorbis_comment_clear(&s->vc); - if ((ret = libvorbis_get_priming_samples(&s->vi, avctx))) return ret; -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
