From 54faffa07fde8fd3e2798d1edff98488a152a304 Mon Sep 17 00:00:00 2001 From: Jeff Peeler Date: Tue, 6 Oct 2009 23:51:19 +0000 Subject: [PATCH] Add missing unlock(s) in dahdi_read (two cases in trunk) (closes issue #15683) Reported by: alecdavis git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@222462 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_dahdi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;