summaryrefslogtreecommitdiff
path: root/libavformat/avio.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-11-09 00:48:40 +0200
committerMartin Storsjö <martin@martin.st>2011-11-10 10:51:06 +0200
commitd10361b65856982fe17032590f490d494f1a01e4 (patch)
treecdcddbdf26a8669ba82f3546fa9f49dd4d525fb6 /libavformat/avio.c
parent6c643e070584ba7af251d3907e277d2170537b1f (diff)
avio: Free URLContext private data allocated via AVOptions
Signed-off-by: Martin Storsjö <martin@martin.st>
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;
}