diff --git a/channels/chan_sip.c b/channels/chan_sip.c index fe1f4bc3b6..113fe95185 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);