[svn-commits] russell: branch 1.8 r296628 - /branches/1.8/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Nov 29 15:26:49 CST 2010


Author: russell
Date: Mon Nov 29 15:26:44 2010
New Revision: 296628

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=296628
Log:
Complete some error handling in transmit_publish() in chan_sip.c.

This error handling block caught my eye.  It was missing a couple of things,
but it should be safe now.  Thanks to mmichelson for the quick peer review
on IRC.

Modified:
    branches/1.8/channels/chan_sip.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=296628&r1=296627&r2=296628
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Mon Nov 29 15:26:44 2010
@@ -11296,8 +11296,10 @@
 	sip_pvt_lock(pvt);
 
 	if (create_addr(pvt, epa_entry->destination, NULL, TRUE, NULL)) {
+		sip_pvt_unlock(pvt);
 		dialog_unlink_all(pvt, TRUE, TRUE);
 		dialog_unref(pvt, "create_addr failed in transmit_publish. Unref dialog");
+		return -1;
 	}
 	ast_sip_ouraddrfor(&pvt->sa, &pvt->ourip, pvt);
 	ast_set_flag(&pvt->flags[0], SIP_OUTGOING);




More information about the svn-commits mailing list