diff options
author | Igor Goncharovskiy <igor.goncharovsky@gmail.com> | 2013-03-05 03:53:44 +0000 |
---|---|---|
committer | Igor Goncharovskiy <igor.goncharovsky@gmail.com> | 2013-03-05 03:53:44 +0000 |
commit | 469ca1c71de62cd0abec830179d5ab1faa5f7837 (patch) | |
tree | 9aa20b978e4e932a24846fd3208a244b2feedab2 /channels/chan_unistim.c | |
parent | 736f4e942038c96c15ea595c67a43187e2f294d8 (diff) |
Fix several unreleased mutex locks that cause problem with processing calls
Reported by: Daniel Bohling
Tested by: Daniel Bohling
(Closes issue ASTERISK-21119)
........
Merged revisions 382409 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 382410 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_unistim.c')
-rw-r--r-- | channels/chan_unistim.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index 80dad41c6..3c9d5d61a 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -4647,6 +4647,7 @@ static struct unistimsession *channel_to_session(struct ast_channel *ast) ast_mutex_lock(&sub->parent->parent->lock); if (!sub->parent->parent->session) { ast_log(LOG_WARNING, "Unistim callback function called without a session\n"); + ast_mutex_unlock(&sub->parent->parent->lock); return NULL; } ast_mutex_unlock(&sub->parent->parent->lock); @@ -5080,6 +5081,7 @@ static int unistim_fixup(struct ast_channel *oldchan, struct ast_channel *newcha if (p->owner != oldchan) { ast_log(LOG_WARNING, "old channel wasn't %s (%p) but was %s (%p)\n", ast_channel_name(oldchan), oldchan, ast_channel_name(p->owner), p->owner); + ast_mutex_unlock(&p->lock); return -1; } |