mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/cache: Fix memleak of tree entries
Found-by: jamrial Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 554f6e930ce05a4c5449efcaae36bdafe2d9de74) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
46e4028e69
commit
dc92c6045f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user