From: Jeff Peeler Date: Tue, 6 Oct 2009 23:51:19 +0000 (+0000) Subject: Add missing unlock(s) in dahdi_read X-Git-Tag: 1.4.27-rc3~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54faffa07fde8fd3e2798d1edff98488a152a304;p=thirdparty%2Fasterisk.git 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 --- 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;