avformat/hlsenc: fix memleak in hls_write_trailer

fix CID: 1426931

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
Steven Liu 2019-08-21 10:24:12 +08:00
parent f0c97d613e
commit 4ba82ecc12
1 changed files with 1 additions and 0 deletions

View File

@ -2538,6 +2538,7 @@ static int hls_write_trailer(struct AVFormatContext *s)
filename = av_asprintf("%s", vs->avf->url);
}
if (!filename) {
av_free(old_filename);
return AVERROR(ENOMEM);
}