diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 18e4972a5e..fa27d113f6 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -252,8 +252,10 @@ static int channel_spy(struct ast_channel *chan, struct chanspy_ds *spyee_chansp } ast_mutex_unlock(&spyee_chanspy_ds->lock); - if (!spyee) + if (!spyee) { + ast_channel_unlock(spyee); return 0; + } /* We now hold the channel lock on spyee */