diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index d68876a7f0..cdfb867b39 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -5679,7 +5679,10 @@ static struct ast_frame *dahdi_read(struct ast_channel *ast) return NULL; } - if ((p->radio || (p->oprmode < 0)) && p->inalarm) return NULL; + if ((p->radio || (p->oprmode < 0)) && p->inalarm) { + ast_mutex_unlock(&p->lock); + return NULL; + } p->subs[idx].f.frametype = AST_FRAME_NULL; p->subs[idx].f.datalen = 0;