diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 100ce5f71a..1958f58981 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -5081,7 +5081,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[index].f.frametype = AST_FRAME_NULL; p->subs[index].f.datalen = 0;