git: 2546ab1b3632 - main - sound: Call vchan_destroy() on vchan_create() failure
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 25 Feb 2025 11:48:11 UTC
The branch main has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=2546ab1b3632a9ebfe88d9d5dc55700e653bff5d
commit 2546ab1b3632a9ebfe88d9d5dc55700e653bff5d
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-02-25 11:43:19 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-02-25 11:43:19 +0000
sound: Call vchan_destroy() on vchan_create() failure
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D48183
---
sys/dev/sound/pcm/vchan.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
index ea8a50b316fe..4ee7e01066d3 100644
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -811,11 +811,8 @@ vchan_create(struct pcm_channel *parent)
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);
}