提交 554f6e93 编写于 作者: M Michael Niedermayer

avformat/cache: Fix memleak of tree entries

Found-by: jamrial
Signed-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 24a189e0
......@@ -283,6 +283,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;
......@@ -292,6 +298,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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册