0e33127 - stable/15 - sound: Remove redundant sndbuf_free() in chn_kill() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7ed840e33127296d31b1098372aa6a23a7518fe5 Auto-Submitted: auto-generated The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7ed840e33127296d31b1098372aa6a23a7518fe5 commit 7ed840e33127296d31b1098372aa6a23a7518fe5 Author: Christos Margiolis AuthorDate: 2025-11-11 12:05:30 +0000 Commit: Christos Margiolis CommitDate: 2025-11-18 00:51:22 +0000 sound: Remove redundant sndbuf_free() in chn_kill() If b exists, it will get destroyed by sndbuf_destroy() (which calls sndbuf_free()) a few lines below, so the additional sndbuf_free() here is redundant. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53527 (cherry picked from commit ad28c6a13a45746f32cbc832b3fe58748fae0d19) --- sys/dev/sound/pcm/channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 749ee4d9cdba..54d8976d46bf 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1373,8 +1373,8 @@ chn_kill(struct pcm_channel *c) } free_unr(chn_getunr(d, c->type), c->unit); feeder_remove(c); - if (c->devinfo && CHANNEL_FREE(c->methods, c->devinfo)) - sndbuf_free(b); + if (c->devinfo) + CHANNEL_FREE(c->methods, c->devinfo); if (bs) { knlist_clear(&bs->sel.si_note, 0); knlist_destroy(&bs->sel.si_note);