avformat/hlsenc: fix memleak of filename

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

View File

@ -2579,9 +2579,8 @@ static int hls_write_trailer(struct AVFormatContext *s)
vs->size = range_length;
hlsenc_io_close(s, &vs->out, filename);
av_free(filename);
failed:
av_free(filename);
av_write_trailer(oc);
if (oc->url[0]) {
proto = avio_find_protocol_name(oc->url);