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
283283 return ret;
284284 }
285285
286+static int enu_free(void *opaque, void *elem)
287+{
288+ av_free(elem);
289+ return 0;
290+}
291+
286292 static int cache_close(URLContext *h)
287293 {
288294 Context *c= h->priv_data;
@@ -292,6 +298,7 @@ static int cache_close(URLContext *h) · 3 unmodified lines
292298
293299 close(c->fd);
294300 ffurl_close(c->inner);
301+ av_tree_enumerate(c->root, NULL, NULL, enu_free);
295302 av_tree_destroy(c->root);
296303
297304 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