summaryrefslogtreecommitdiff
path: root/libavformat/hls.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r--libavformat/hls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 84f0a5f323..4a3e0d6842 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -311,8 +311,10 @@ static struct playlist *new_playlist(HLSContext *c, const char *url,
return NULL;
reset_packet(&pls->pkt);
ff_make_absolute_url(pls->url, sizeof(pls->url), base, url);
- if (!pls->url[0])
+ if (!pls->url[0]) {
+ av_free(pls);
return NULL;
+ }
pls->seek_timestamp = AV_NOPTS_VALUE;
pls->is_id3_timestamped = -1;