diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -811,11 +811,8 @@ return (ret); fail: - CHN_REMOVE(parent, ch, children); - parent->flags &= ~CHN_F_HAS_VCHAN; - CHN_UNLOCK(parent); - chn_kill(ch); - CHN_LOCK(parent); + CHN_LOCK(ch); + vchan_destroy(ch); return (ret); }