aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-11 00:59:18 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-11 00:59:18 +0000
commit5b0128ccb35ea27a4422c0ada5f88d84a9ce54e5 (patch)
tree4534ac8a06eaa4105250fe7bf692065de99a028c /channels
parenta1677905551f6e77b223954b288050b966dd6692 (diff)
If we fail to alloc a channel, we should re-lock the pvt structure before returning.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107290 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index fe1f4bc3b..113fe9518 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3983,6 +3983,7 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit
}
if (!tmp) {
ast_log(LOG_WARNING, "Unable to allocate AST channel structure for SIP channel\n");
+ ast_mutex_lock(&i->lock);
return NULL;
}
ast_mutex_lock(&i->lock);