* commit '7915e6741dbe1cf3a8781cead3e68a7666de14f4':
hlsproto: Properly close avio buffer in case of error
Merged-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -121,8 +121,10 @@ static int parse_playlist(URLContext *h, const char *url) |
121 | 121 |
return ret; |
122 | 122 |
|
123 | 123 |
read_chomp_line(in, line, sizeof(line)); |
124 |
- if (strcmp(line, "#EXTM3U")) |
|
125 |
- return AVERROR_INVALIDDATA; |
|
124 |
+ if (strcmp(line, "#EXTM3U")) { |
|
125 |
+ ret = AVERROR_INVALIDDATA; |
|
126 |
+ goto fail; |
|
127 |
+ } |
|
126 | 128 |
|
127 | 129 |
free_segment_list(s); |
128 | 130 |
s->finished = 0; |