diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-06-12 02:29:08 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-06-12 02:29:08 +0000 |
commit | 272dd008d08b93c96cbab94fd2bcd607152681f7 (patch) | |
tree | f5c55bb1acdbb448bdeff64ab059b45a615d3881 /main/loader.c | |
parent | 41e428275101c117607f9a6503f054f13fa8f78b (diff) |
Fix memory leak while loading modules, adding formats, and destroying endpoints
This patch fixes three memory leaks
* When we load a module with the LOAD_PRIORITY flag, we remove its entry from
the load order list. Unfortunately, we don't free the memory associated with
entry in the list. This patch corrects that and properly frees the memory
for the module in the list.
* When adding a custom format (such as SILK or CELT), the routine for adding
the format was leaking a reference. RAII_VAR cleans this up properly.
* We now de-ref the channel_snapshot appropriately when an endpoint is
disposed of
........
Merged revisions 391489 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 391507 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/loader.c')
-rw-r--r-- | main/loader.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/loader.c b/main/loader.c index be08d7f96..86735df52 100644 --- a/main/loader.c +++ b/main/loader.c @@ -1110,6 +1110,8 @@ static int load_resource_list(struct load_order *load_order, unsigned int global break; case AST_MODULE_LOAD_PRIORITY: AST_LIST_REMOVE_CURRENT(entry); + ast_free(order->resource); + ast_free(order); break; } } |