From d10361b65856982fe17032590f490d494f1a01e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 9 Nov 2011 00:48:40 +0200 Subject: [PATCH] avio: Free URLContext private data allocated via AVOptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/avio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index a954aa8170..8e1854976e 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -335,8 +335,11 @@ int ffurl_close(URLContext *h) #if CONFIG_NETWORK ff_network_close(); #endif - if (h->prot->priv_data_size) + if (h->prot->priv_data_size) { + if (h->prot->priv_data_class) + av_opt_free(h->priv_data); av_free(h->priv_data); + } av_free(h); return ret; }