diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-04 18:35:47 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-04 18:35:47 +0000 |
commit | 298c626e8d4580b02c2c528188d3a1754cc6c541 (patch) | |
tree | 21018a83c40eecafca36b2f6264a3703d8206eb9 | |
parent | d8be482a706ecce628d63efdba22eab8a5856252 (diff) |
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/branches/1.4@120425 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_zap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index e79520c86..ae7fd750a 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -2102,8 +2102,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) { |