ffmpeg | branch: master | Vittorio Giovara <vittorio.giov...@gmail.com> | Thu 
Jan 22 20:13:44 2015 +0000| [7915e6741dbe1cf3a8781cead3e68a7666de14f4] | 
committer: Vittorio Giovara

hlsproto: Properly close avio buffer in case of error

Fix a memory leak.

CC: libav-sta...@libav.org
Bug-Id: CID 717999

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7915e6741dbe1cf3a8781cead3e68a7666de14f4
---

 libavformat/hlsproto.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/hlsproto.c b/libavformat/hlsproto.c
index 751fef2..0eba049 100644
--- a/libavformat/hlsproto.c
+++ b/libavformat/hlsproto.c
@@ -121,8 +121,10 @@ static int parse_playlist(URLContext *h, const char *url)
         return ret;
 
     read_chomp_line(in, line, sizeof(line));
-    if (strcmp(line, "#EXTM3U"))
-        return AVERROR_INVALIDDATA;
+    if (strcmp(line, "#EXTM3U")) {
+        ret = AVERROR_INVALIDDATA;
+        goto fail;
+    }
 
     free_segment_list(s);
     s->finished = 0;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to