diff mbox

[FFmpeg-devel,v1,1/3] avformat/hlsenc: fix memleak in hls_write_trailer

Message ID 20190821022412.30546-1-lq@chinaffmpeg.org
State Accepted
Commit 4ba82ecc12b7a587e0c2e0885599c3e8d79aaf61
Headers show

Commit Message

Liu Steven Aug. 21, 2019, 2:24 a.m. UTC
fix CID: 1426931

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/hlsenc.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 836e290eea..fbc6554b97 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2539,6 +2539,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);
         }