History

avformat/cache: Fix memleak of tree entries

Found-by: jamrial

Michael Niedermayer committed 10 years ago

Commit 554f6e91 parent 24a189e1 file · +7 −0Browse files

Unified · Split

libavformat/cache.c+7−0
@@ -283,6 +283,12 @@ resolve_eof: · 282 unmodified lines
283 return ret;283 return ret;
284}284}
285 285
286static int enu_free(void *opaque, void *elem)
287{
288 av_free(elem);
289 return 0;
290}
291
286static int cache_close(URLContext *h)292static int cache_close(URLContext *h)
287{293{
288 Context *c= h->priv_data;294 Context *c= h->priv_data;
@@ -292,6 +298,7 @@ static int cache_close(URLContext *h) · 3 unmodified lines
292 298
293 close(c->fd);299 close(c->fd);
294 ffurl_close(c->inner);300 ffurl_close(c->inner);
301 av_tree_enumerate(c->root, NULL, NULL, enu_free);
295 av_tree_destroy(c->root);302 av_tree_destroy(c->root);
296 303
297 return 0;304 return 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t