[asterisk-commits] russell: trunk r128564 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 7 06:53:55 CDT 2008


Author: russell
Date: Mon Jul  7 06:53:52 2008
New Revision: 128564

URL: http://svn.digium.com/view/asterisk?view=rev&rev=128564
Log:
As pointed out on the -dev list, actually use the result of find_peer() so that
a peer reference is not leaked.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=128564&r1=128563&r2=128564
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jul  7 06:53:52 2008
@@ -11687,8 +11687,9 @@
 	peer = find_peer(of, NULL, TRUE, FALSE);
 
 	/* If not found, then find device on IP (if it's not a SUBSCRIBE) */
-	if (!peer && sipmethod != SIP_SUBSCRIBE)
-		find_peer(NULL, &p->recv, TRUE, FALSE);
+	if (!peer && sipmethod != SIP_SUBSCRIBE) {
+		peer = find_peer(NULL, &p->recv, TRUE, FALSE);
+	}
 
 	if (!peer) {
 		if (debug)




More information about the asterisk-commits mailing list