]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If we fail to alloc a channel, we should re-lock the pvt structure before returning.
authorTerry Wilson <twilson@digium.com>
Tue, 11 Mar 2008 00:59:18 +0000 (00:59 +0000)
committerTerry Wilson <twilson@digium.com>
Tue, 11 Mar 2008 00:59:18 +0000 (00:59 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107290 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index fe1f4bc3b624b6da9d3a9e7ba691e2917ebcd78e..113fe951854b4a60b38431a3df8d322d80cc77fa 100644 (file)
@@ -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);