diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-01-22 20:13:44 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-01-23 14:55:03 +0000 |
commit | 7915e6741dbe1cf3a8781cead3e68a7666de14f4 (patch) | |
tree | 17fd12e5a45493db2b2e96f82e00609e0722f858 /libavformat | |
parent | 4c5fa628da099dbb598c93bc4555b8733d2c3035 (diff) | |
download | ffmpeg-7915e6741dbe1cf3a8781cead3e68a7666de14f4.tar.gz |
hlsproto: Properly close avio buffer in case of error
Fix a memory leak.
CC: libav-stable@libav.org
Bug-Id: CID 717999
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/hlsproto.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/hlsproto.c b/libavformat/hlsproto.c index 751fef2e4d..0eba049797 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; |