This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new d15a9d5961 avformat/whip: fix memleak when avio_alloc_context() fails
d15a9d5961 is described below
commit d15a9d5961e6f9a0cb8c1c9d692ce9b985b58db2
Author: Jack Lau <[email protected]>
AuthorDate: Mon Nov 24 10:16:17 2025 +0800
Commit: Jack Lau <[email protected]>
CommitDate: Mon Jan 19 21:34:43 2026 +0800
avformat/whip: fix memleak when avio_alloc_context() fails
The buffer is prepared for avio, so we need to free
the buffer at the end when avio_alloc_context() fails,
otherwise, it will cause memleak.
Signed-off-by: Jack Lau <[email protected]>
---
libavformat/whip.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/whip.c b/libavformat/whip.c
index 4ff710f4e4..b3d661fa1a 100644
--- a/libavformat/whip.c
+++ b/libavformat/whip.c
@@ -1619,8 +1619,11 @@ static int create_rtp_muxer(AVFormatContext *s)
ELAPSED(whip->whip_dtls_time, whip->whip_srtp_time));
end:
- if (rtp_ctx)
+ if (rtp_ctx) {
+ if (!rtp_ctx->pb)
+ av_freep(&buffer);
avio_context_free(&rtp_ctx->pb);
+ }
avformat_free_context(rtp_ctx);
av_dict_free(&opts);
return ret;
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]