diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-22 22:48:59 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-22 22:48:59 +0000 |
commit | 6f9bf4b16180ac9327c42811f3928b0bf7868ca0 (patch) | |
tree | 94c4619b7e2101789155db02fe509db80f4a5999 /channels | |
parent | 08c400b688b9fb5a7a89f1889911657990b14894 (diff) |
Fix locks that are held too long
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2527 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_zap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 9d6809751..cf860365f 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -2325,8 +2325,11 @@ static int zt_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, oi2 = zt_get_index(c1, p1, 0); oc1 = p0->owner; oc2 = p1->owner; - if ((oi1 < 0) || (oi2 < 0)) + if ((oi1 < 0) || (oi2 < 0)) { + ast_mutex_unlock(&c0->lock); + ast_mutex_unlock(&c1->lock); return -1; + } |