[asterisk-commits] mmichelson: branch russell/ast_channel_ao2 r184144 - /team/russell/ast_channe...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 24 19:05:53 CDT 2009
Author: mmichelson
Date: Tue Mar 24 19:05:43 2009
New Revision: 184144
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=184144
Log:
Make sure to move the autochan to the new channel.
This fixes a memory leak spotted during reviewing this branch.
Modified:
team/russell/ast_channel_ao2/main/autochan.c
Modified: team/russell/ast_channel_ao2/main/autochan.c
URL: http://svn.digium.com/svn-view/asterisk/team/russell/ast_channel_ao2/main/autochan.c?view=diff&rev=184144&r1=184143&r2=184144
==============================================================================
--- team/russell/ast_channel_ao2/main/autochan.c (original)
+++ team/russell/ast_channel_ao2/main/autochan.c Tue Mar 24 19:05:43 2009
@@ -76,7 +76,9 @@
{
struct ast_autochan *autochan;
- AST_LIST_TRAVERSE(&old_chan->autochans, autochan, list) {
+ AST_LIST_APPEND_LIST(&old_chan->autochans, &new_chan->autochans, list);
+
+ AST_LIST_TRAVERSE(&new_chan->autochans, autochan, list) {
if (autochan->chan == old_chan) {
autochan->chan = ast_channel_unref(old_chan);
autochan->chan = ast_channel_ref(new_chan);
More information about the asterisk-commits
mailing list