]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
avoiding secondary deadlock
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 8 Nov 2007 01:40:45 +0000 (01:40 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 8 Nov 2007 01:40:45 +0000 (01:40 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@325 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/src/zap_io.c

index 09d4727dc645dcffaa2fe0a4e8fe02cf21d3914f..2030e5ecc5464759b4ebf8a4e81821cfce017b0f 100644 (file)
@@ -719,7 +719,7 @@ zap_status_t zap_channel_open_any(uint32_t span_id, zap_direction_t direction, z
                                        zap_set_flag(check, ZAP_CHANNEL_INUSE);
                                        zap_channel_open_chan(check);
                                        *zchan = check;
-                                       return status;
+                                       goto done;
                                }
                        }
                        
@@ -740,6 +740,7 @@ zap_status_t zap_channel_open_any(uint32_t span_id, zap_direction_t direction, z
                }
        }
 
+ done:
        zap_mutex_unlock(globals.mutex);
 
        return status;