[asterisk-commits] tilghman: trunk r120426 - in /trunk: ./ channels/chan_zap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 4 13:37:08 CDT 2008


Author: tilghman
Date: Wed Jun  4 13:37:08 2008
New Revision: 120426

URL: http://svn.digium.com/view/asterisk?view=rev&rev=120426
Log:
Merged revisions 120425 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r120425 | tilghman | 2008-06-04 13:35:47 -0500 (Wed, 04 Jun 2008) | 6 lines

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:
    trunk/   (props changed)
    trunk/channels/chan_zap.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=120426&r1=120425&r2=120426
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Wed Jun  4 13:37:08 2008
@@ -2561,8 +2561,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