From: Brian Degenhardt Date: Tue, 3 Mar 2009 20:02:20 +0000 (+0000) Subject: fix a leaked channel lock (and future deadlock) when we try to pick up our own channel X-Git-Tag: 1.6.2.0-beta1~95 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7092f0acc3cbcd3c0dd4fb2dae4584d4ee34eca;p=thirdparty%2Fasterisk.git fix a leaked channel lock (and future deadlock) when we try to pick up our own channel git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179903 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c index 640911317e..605d11faff 100644 --- a/apps/app_directed_pickup.c +++ b/apps/app_directed_pickup.c @@ -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; }