tests/test_cel: Unlock bridge on off nominal paths
authorMatthew Jordan <mjordan@digium.com>
Fri, 14 Nov 2014 21:51:22 +0000 (21:51 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 14 Nov 2014 21:51:22 +0000 (21:51 +0000)
If the test fails due to memory allocation errors, we may as well attempt to
unlock the bridge on the way out.
........

Merged revisions 427927 from http://svn.asterisk.org/svn/asterisk/branches/13

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

tests/test_cel.c

index c86f429..194bbf3 100644 (file)
@@ -1275,11 +1275,13 @@ AST_TEST_DEFINE(test_cel_blind_transfer)
        transfer_msg = ast_blind_transfer_message_create(1, chan_alice,
                        "transfer_extension", "transfer_context");
        if (!transfer_msg) {
+               ast_bridge_unlock(bridge);
                ast_test_status_update(test, "Failed to create transfer Stasis message\n");
                return AST_TEST_FAIL;
        }
        transfer_msg->bridge = ast_bridge_snapshot_create(bridge);
        if (!transfer_msg->bridge) {
+               ast_bridge_unlock(bridge);
                ast_test_status_update(test, "Failed to create bridge snapshot\n");
                return AST_TEST_FAIL;
        }