Commit 7915e674 authored by Vittorio Giovara's avatar Vittorio Giovara

hlsproto: Properly close avio buffer in case of error

Fix a memory leak.

CC: libav-stable@libav.org
Bug-Id: CID 717999
parent 4c5fa628
...@@ -121,8 +121,10 @@ static int parse_playlist(URLContext *h, const char *url) ...@@ -121,8 +121,10 @@ static int parse_playlist(URLContext *h, const char *url)
return ret; return ret;
read_chomp_line(in, line, sizeof(line)); read_chomp_line(in, line, sizeof(line));
if (strcmp(line, "#EXTM3U")) if (strcmp(line, "#EXTM3U")) {
return AVERROR_INVALIDDATA; ret = AVERROR_INVALIDDATA;
goto fail;
}
free_segment_list(s); free_segment_list(s);
s->finished = 0; s->finished = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment