diff options
author | Matthew Jordan <mjordan@digium.com> | 2014-11-14 18:54:20 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2014-11-14 18:54:20 +0000 |
commit | 6b7a2dc7b9da026acc5b2ffce6eee5014e606656 (patch) | |
tree | c638b4858dd829d29726e4d5ff8c33f933a0e1cf /tests | |
parent | 8c61b4890b232d865bac69e6aaf3307c0210dc6d (diff) |
tests/test_cel: Unlock bridge on off nominal paths
If the test fails due to memory allocation errors, we may as well attempt to
unlock the bridge on the way out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@427927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_cel.c b/tests/test_cel.c index c86f429ac..194bbf311 100644 --- a/tests/test_cel.c +++ b/tests/test_cel.c @@ -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; } |