]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add missing unlock(s) in dahdi_read
authorJeff Peeler <jpeeler@digium.com>
Tue, 6 Oct 2009 23:51:19 +0000 (23:51 +0000)
committerJeff Peeler <jpeeler@digium.com>
Tue, 6 Oct 2009 23:51:19 +0000 (23:51 +0000)
(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

index 100ce5f71a0ce0f94c93def0e2637c53b70c3e8f..1958f58981927aea746ac4d266a652ed9290f213 100644 (file)
@@ -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;