aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-01 20:15:58 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-01 20:15:58 +0000
commit22cabc5da633a4426dd6a15ea2a0bb5dbc9ea976 (patch)
tree77bdaee428d891653f292998b110f92d45fdc2aa /pbx.c
parent74b47e9ed68f3ed1386092316cce7e187ba2cacc (diff)
don't unlock a channel we didn't lock
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6486 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pbx.c b/pbx.c
index 511218e7c..9db31faa1 100755
--- a/pbx.c
+++ b/pbx.c
@@ -4881,7 +4881,8 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout
ast_verbose(VERBOSE_PREFIX_4 "Channel %s was answered.\n", chan->name);
if (sync > 1) {
- ast_mutex_unlock(&chan->lock);
+ if (channel)
+ ast_mutex_unlock(&chan->lock);
if (ast_pbx_run(chan)) {
ast_log(LOG_ERROR, "Unable to run PBX on %s\n", chan->name);
ast_hangup(chan);