summaryrefslogtreecommitdiff
path: root/libavformat/avio.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r--libavformat/avio.c5
1 files changed, 4 insertions, 1 deletions
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;
}