mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/hls: Fix memleak when url is empty
Fixes Coverity ID 1465888. Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit dfc6a9f07543e3c2bf01baaf8459558365f961d2)
This commit is contained in:
parent
4bc5de8e55
commit
b03a876050
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user