hls: fix leaking avio_opts on hls_read_header error
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Mon, 7 Nov 2016 18:43:16 +0000 (19:43 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Mon, 7 Nov 2016 18:44:41 +0000 (19:44 +0100)
Use the hls_close function to reduce code duplication.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavformat/hls.c

index e762bc1..3ae3c7c 100644 (file)
@@ -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;
 }