From 80d2a7f5c64f7a0f8534373e246066cf733c70d8 Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Wed, 21 Aug 2019 10:24:25 +0800 Subject: avformat/hlsenc: fix memleak of filename CID: 1452445 Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 3c873e5357..03b06cabe8 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -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); -- cgit v1.2.3