The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=643a606fa2742b94f6eca620119b7d2686ca9cd3
commit 643a606fa2742b94f6eca620119b7d2686ca9cd3 Author: Christos Margiolis <[email protected]> AuthorDate: 2025-12-06 14:28:08 +0000 Commit: Christos Margiolis <[email protected]> CommitDate: 2025-12-06 14:28:08 +0000 sndctl(8): Do not free and re-open device There was a reason for this, but it does not apply anymore. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54031 --- usr.sbin/sndctl/sndctl.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/usr.sbin/sndctl/sndctl.c b/usr.sbin/sndctl/sndctl.c index 6977f0ab0ebe..e6dac67e2ea7 100644 --- a/usr.sbin/sndctl/sndctl.c +++ b/usr.sbin/sndctl/sndctl.c @@ -992,17 +992,10 @@ next: argv++; } - free_dev(dp); - if (show) { - /* - * Re-read dev to reflect new state in case we changed some - * property. - */ - dp = read_dev(path); print_dev(dp); - free_dev(dp); } + free_dev(dp); return (0); }
