[asterisk-commits] jpeeler: branch jpeeler/chan_dahdi14 r122310 - /team/jpeeler/chan_dahdi14/cha...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 12 13:42:41 CDT 2008


Author: jpeeler
Date: Thu Jun 12 13:42:41 2008
New Revision: 122310

URL: http://svn.digium.com/view/asterisk?view=rev&rev=122310
Log:
If we fail to setup the PRI request channel, don't continue, exit with an error.
(closes issue #11989)
 Reported by: Corydon76
 Patches: 
       20080213__zap_memleak.diff.txt uploaded by Corydon76 (license 14)
(Moved from chan_zap to chan_dahdi)

Modified:
    team/jpeeler/chan_dahdi14/channels/chan_dahdi.c

Modified: team/jpeeler/chan_dahdi14/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/channels/chan_dahdi.c?view=diff&rev=122310&r1=122309&r2=122310
==============================================================================
--- team/jpeeler/chan_dahdi14/channels/chan_dahdi.c (original)
+++ team/jpeeler/chan_dahdi14/channels/chan_dahdi.c Thu Jun 12 13:42:41 2008
@@ -2109,8 +2109,11 @@
 		}
 		if (!(sr = pri_sr_new())) {
 			ast_log(LOG_WARNING, "Failed to allocate setup request channel %d\n", p->channel);
+			pri_destroycall(p->pri->pri, p->call);
+			p->call = NULL;
 			pri_rel(p->pri);
 			ast_mutex_unlock(&p->lock);
+			return -1;
 		}
 		if (p->bearer || (mysig == SIG_FXSKS)) {
 			if (p->bearer) {




More information about the asterisk-commits mailing list