[FFmpeg-cvslog] hls: fix leaking avio_opts on hls_read_header error

Andreas Cadhalpun git at videolan.org
Mon Nov 7 20:51:04 EET 2016


ffmpeg | branch: master | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Mon Nov  7 19:43:16 2016 +0100| [2c90316b46fce5785bc6af72c8fd369c31666604] | committer: Andreas Cadhalpun

hls: fix leaking avio_opts on hls_read_header error

Use the hls_close function to reduce code duplication.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2c90316b46fce5785bc6af72c8fd369c31666604
---

 libavformat/hls.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index e762bc1..3ae3c7c 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1807,9 +1807,7 @@ static int hls_read_header(AVFormatContext *s)
 
     return 0;
 fail:
-    free_playlist_list(c);
-    free_variant_list(c);
-    free_rendition_list(c);
+    hls_close(s);
     return ret;
 }
 



More information about the ffmpeg-cvslog mailing list