diff options
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b088cba64..e54178fbe 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2820,11 +2820,11 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, char *title) ast_mutex_unlock(&i->lock); /* Don't hold a sip pvt lock while we allocate a channel */ tmp = ast_channel_alloc(1); - ast_mutex_lock(&i->lock); if (!tmp) { ast_log(LOG_WARNING, "Unable to allocate SIP channel structure\n"); return NULL; } + ast_mutex_lock(&i->lock); tmp->tech = &sip_tech; /* Select our native format based on codec preference until we receive something from another device to the contrary. */ |