[asterisk-commits] qwell: branch 1.4 r88585 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 5 11:19:42 CST 2007


Author: qwell
Date: Mon Nov  5 11:19:41 2007
New Revision: 88585

URL: http://svn.digium.com/view/asterisk?view=rev&rev=88585
Log:
Make sure we destroy the config structure on configuration failure.

Issue 11163, patch by eliel.

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=88585&r1=88584&r2=88585
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Mon Nov  5 11:19:41 2007
@@ -16973,6 +16973,7 @@
 	}
 	if (ast_find_ourip(&__ourip, bindaddr)) {
 		ast_log(LOG_WARNING, "Unable to get own IP address, SIP disabled\n");
+		ast_config_destroy(cfg);
 		return 0;
 	}
 	if (!ntohs(bindaddr.sin_port))
@@ -16987,6 +16988,7 @@
 		sipsock = socket(AF_INET, SOCK_DGRAM, 0);
 		if (sipsock < 0) {
 			ast_log(LOG_WARNING, "Unable to create SIP socket: %s\n", strerror(errno));
+			ast_config_destroy(cfg);
 			return -1;
 		} else {
 			/* Allow SIP clients on the same host to access us: */




More information about the asterisk-commits mailing list