mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01: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>
This commit is contained in:
parent
ab384d289d
commit
dfc6a9f075
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue