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 aebc956a22 avformat/http: free the zlib state when the open fails
aebc956a22 is described below
commit aebc956a224e1b5a921b38ead49725494d56f795
Author: Martin Mirchev <[email protected]>
AuthorDate: Tue Nov 10 12:01:40 2026 +0800
Commit: James Almer <[email protected]>
CommitDate: Tue Nov 10 21:19:17 2026 +0000
avformat/http: free the zlib state when the open fails
parse_content_encoding() initialises the inflate stream as soon as a
Content-Encoding: gzip or deflate header is read. If the open fails
after that, e.g. because the connection ends before the end of the
headers, http_close() is not called and the stream is never freed:
LeakSanitizer reports 7160 bytes per failed open.
Call inflateEnd() in the error path of http_open(). inflateEnd() is a
no-op on a stream that was never initialised.
Reported in the review of #25635.
Signed-off-by: Martin Mirchev <[email protected]>
---
libavformat/http.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/http.c b/libavformat/http.c
index 2f4f522363..a7854122f1 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -864,6 +864,9 @@ static int http_open(URLContext *h, const char *uri, int
flags,
ret = http_open_cnx(h, options, 0);
bail_out:
if (ret < 0) {
+#if CONFIG_ZLIB
+ inflateEnd(&s->inflate_stream);
+#endif
av_dict_free(&s->chained_options);
av_dict_free(&s->cookie_dict);
av_dict_free(&s->redirect_cache);
--
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]