[svn-commits] tilghman: branch 1.4 r120425 - /branches/1.4/channels/chan_zap.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 4 13:35:47 CDT 2008


Author: tilghman
Date: Wed Jun  4 13:35:47 2008
New Revision: 120425

URL: http://svn.digium.com/view/asterisk?view=rev&rev=120425
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)

Modified:
    branches/1.4/channels/chan_zap.c

Modified: branches/1.4/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_zap.c?view=diff&rev=120425&r1=120424&r2=120425
==============================================================================
--- branches/1.4/channels/chan_zap.c (original)
+++ branches/1.4/channels/chan_zap.c Wed Jun  4 13:35:47 2008
@@ -2102,8 +2102,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 svn-commits mailing list