[asterisk-commits] file: branch 1.6.1 r182173 - in /branches/1.6.1: ./ main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 16 09:00:24 CDT 2009
Author: file
Date: Mon Mar 16 09:00:21 2009
New Revision: 182173
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=182173
Log:
Merged revisions 182171 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r182171 | file | 2009-03-16 10:58:24 -0300 (Mon, 16 Mar 2009) | 7 lines
Fix a memory leak in the ast_answer / __ast_answer API call.
For a channel that is not yet answered this API call will wait
until a voice frame is received on the channel before returning.
It does this by waiting for frames on the channel and reading them
in. The frames read in were not freed when they should have been.
........
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/main/channel.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/main/channel.c?view=diff&rev=182173&r1=182172&r2=182173
==============================================================================
--- branches/1.6.1/main/channel.c (original)
+++ branches/1.6.1/main/channel.c Mon Mar 16 09:00:21 2009
@@ -1730,14 +1730,19 @@
}
f = ast_read(chan);
if (!f || (f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_HANGUP)) {
+ if (f) {
+ ast_frfree(f);
+ }
res = -1;
ast_debug(2, "Hangup of channel %s detected in answer routine\n", chan->name);
break;
}
if (f->frametype == AST_FRAME_VOICE) {
+ ast_frfree(f);
res = 0;
break;
}
+ ast_frfree(f);
}
}
break;
More information about the asterisk-commits
mailing list