]> git.sesse.net Git - ffmpeg/commitdiff
avformat/hlsenc: free options fix memleak in hls_write_trailer
authorSteven Liu <lq@chinaffmpeg.org>
Tue, 12 May 2020 10:04:20 +0000 (18:04 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Tue, 12 May 2020 14:32:08 +0000 (22:32 +0800)
Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
libavformat/hlsenc.c

index 0abf5402a8f6e0cd0c3aab372b656fbd142688df..a21171c6f9c5e8e718505a9fd7f8f7abcb34bd89 100644 (file)
@@ -2685,9 +2685,10 @@ static int hls_write_trailer(struct AVFormatContext *s)
             if (ret < 0)
                 av_log(s, AV_LOG_WARNING, "Failed to upload file '%s' at the end.\n", oc->url);
         }
-        av_freep(&vs->temp_buffer);
 
 failed:
+        av_freep(&vs->temp_buffer);
+        av_dict_free(&options);
         av_freep(&filename);
         av_write_trailer(oc);
         if (oc->url[0]) {