Commit 69942c4f authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/cache: Fix memleak of tree entries

Found-by: jamrial
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 554f6e93)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 7aaab368
......@@ -282,6 +282,12 @@ resolve_eof:
return ret;
}
static int enu_free(void *opaque, void *elem)
{
av_free(elem);
return 0;
}
static int cache_close(URLContext *h)
{
Context *c= h->priv_data;
......@@ -291,6 +297,7 @@ static int cache_close(URLContext *h)
close(c->fd);
ffurl_close(c->inner);
av_tree_enumerate(c->root, NULL, NULL, enu_free);
av_tree_destroy(c->root);
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment