From 2c90316b46fce5785bc6af72c8fd369c31666604 Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Mon, 7 Nov 2016 19:43:16 +0100 Subject: hls: fix leaking avio_opts on hls_read_header error Use the hls_close function to reduce code duplication. Reviewed-by: Michael Niedermayer Signed-off-by: Andreas Cadhalpun --- libavformat/hls.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libavformat/hls.c') diff --git a/libavformat/hls.c b/libavformat/hls.c index e762bc19fc..3ae3c7cc5c 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; } -- cgit v1.2.3