[asterisk-commits] trunk r27477 - /trunk/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue May 16 13:08:29 MST 2006


Author: kpfleming
Date: Tue May 16 15:08:29 2006
New Revision: 27477

URL: http://svn.digium.com/view/asterisk?rev=27477&view=rev
Log:
Merged revisions 27468 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r27468 | kpfleming | 2006-05-16 15:05:17 -0500 (Tue, 16 May 2006) | 2 lines

don't leak frames when deferring DTMF or dropping duplicate ANSWER frames (issue #7041, slightly different fix, reported/patched by clausf)

........

Modified:
    trunk/channel.c

Modified: trunk/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/channel.c?rev=27477&r1=27476&r2=27477&view=diff
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Tue May 16 15:08:29 2006
@@ -1955,9 +1955,11 @@
 			if (f->subclass == AST_CONTROL_ANSWER) {
 				if (!ast_test_flag(chan, AST_FLAG_OUTGOING)) {
 					ast_log(LOG_DEBUG, "Ignoring answer on an inbound call!\n");
+					ast_frfree(f);
 					f = &ast_null_frame;
 				} else if (prestate == AST_STATE_UP) {
 					ast_log(LOG_DEBUG, "Dropping duplicate answer!\n");
+					ast_frfree(f);
 					f = &ast_null_frame;
 				} else {
 					/* Answer the CDR */
@@ -1973,6 +1975,7 @@
 					chan->dtmfq[strlen(chan->dtmfq)] = f->subclass;
 				else
 					ast_log(LOG_WARNING, "Dropping deferred DTMF digits on %s\n", chan->name);
+				ast_frfree(f);
 				f = &ast_null_frame;
 			}
 			break;



More information about the asterisk-commits mailing list