[vlc-commits] access: http: fix resp leaks on incorrect TE (cid #1346968)
Francois Cartegnie
git at videolan.org
Thu Dec 31 15:29:44 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 31 14:51:52 2015 +0100| [10e3b5a898d3760c9f07731299ca35c2b6cd595c] | committer: Francois Cartegnie
access: http: fix resp leaks on incorrect TE (cid #1346968)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=10e3b5a898d3760c9f07731299ca35c2b6cd595c
---
modules/access/http/h1conn.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/access/http/h1conn.c b/modules/access/http/h1conn.c
index 3e029fe..6d1e7fda 100644
--- a/modules/access/http/h1conn.c
+++ b/modules/access/http/h1conn.c
@@ -206,12 +206,18 @@ static struct vlc_http_msg *vlc_h1_stream_wait(struct vlc_http_stream *stream)
if (str != NULL)
{
if (vlc_http_next_token(str) != NULL)
+ {
+ vlc_http_msg_destroy(resp);
return vlc_h1_stream_fatal(conn); /* unsupported TE */
+ }
assert(conn->content_length == UINTMAX_MAX);
stream = vlc_chunked_open(stream, conn->conn.tls);
if (unlikely(stream == NULL))
+ {
+ vlc_http_msg_destroy(resp);
return vlc_h1_stream_fatal(conn);
+ }
}
}
else
More information about the vlc-commits
mailing list