[asterisk-commits] mjordan: trunk r397606 - /trunk/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 23 17:12:59 CDT 2013


Author: mjordan
Date: Fri Aug 23 17:12:57 2013
New Revision: 397606

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397606
Log:
Fix channel reference leak in Originated channels

When originating channels, ast_pbx_outgoing_* caused the dialed channel
reference to be bumped twice. Ostensibly, this routine is bumping the channel
lifetime such that the channel doesn't get nuked in between locks/unlocks;
however, since the routine should return the dialed channel with its
reference bumped, it only needs to do this one time.

Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/pbx.c?view=diff&rev=397606&r1=397605&r2=397606
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Fri Aug 23 17:12:57 2013
@@ -10101,8 +10101,7 @@
 
 	/* Wait for dialing to complete */
 	if (channel || synchronous) {
-		if (channel) {
-			ast_channel_ref(*channel);
+		if (channel && *channel) {
 			ast_channel_unlock(*channel);
 		}
 		while (!outgoing->dialed) {




More information about the asterisk-commits mailing list