]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Unlock outgoing dial lock on off nominal path
authorMatthew Jordan <mjordan@digium.com>
Mon, 12 Aug 2013 15:48:58 +0000 (15:48 +0000)
committerMatthew Jordan <mjordan@digium.com>
Mon, 12 Aug 2013 15:48:58 +0000 (15:48 +0000)
If the thread servicing the dial request isn't created successfully, the
outgoing dial lock will still be held when the function returns. This patch
unlocks the lock on this off nominal path.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396542 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index 4db89f803ab753937945818afac1c21b24e95140..5000bf47b5d48c7345e096465176b4c23938f3c5 100644 (file)
@@ -9969,6 +9969,7 @@ static int pbx_outgoing_attempt(const char *type, struct ast_format_cap *cap, co
                        ast_channel_unlock(*channel);
                        ast_channel_unref(*channel);
                }
+               ast_mutex_unlock(&outgoing->lock);
                ao2_ref(outgoing, -1);
                return -1;
        }