aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-04 18:37:08 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-04 18:37:08 +0000
commit9be088d95a4f21dc7c2f8bb36fb6e76015a96af9 (patch)
treef29260ea754a334a84d6f3936c4c7ff10bef5497 /channels
parent302e4601c63de5d17e745e4a0bc261378a890bd4 (diff)
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) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120426 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_zap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 5187685e2..daeb7cf50 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -2561,8 +2561,11 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
}
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) {