]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix a leaked channel lock (and future deadlock) when we try to pick up our own channel
authorBrian Degenhardt <bmd@digium.com>
Tue, 3 Mar 2009 20:02:20 +0000 (20:02 +0000)
committerBrian Degenhardt <bmd@digium.com>
Tue, 3 Mar 2009 20:02:20 +0000 (20:02 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179903 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_directed_pickup.c

index 640911317e6f890404349f10ce7d7044ef2038b9..605d11faff1916866c1f6144b7f6e22300dd7dcf 100644 (file)
@@ -163,8 +163,8 @@ static int pickup_by_channel(struct ast_channel *chan, char *pickup)
        /* Just check that we are not picking up the SAME as target */
        if (chan->name != target->name && chan != target) {
                res = pickup_do(chan, target);
-               ast_channel_unlock(target);
        }
+       ast_channel_unlock(target);
 
        return res;
 }