git: 6043e26b902b - stable/15 - sndctl(8): Do not free and re-open device
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 15 Dec 2025 13:30:15 UTC
The branch stable/15 has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=6043e26b902bacf301b0d4360a84085292608a10
commit 6043e26b902bacf301b0d4360a84085292608a10
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-12-06 14:28:08 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-12-15 13:29:22 +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
(cherry picked from commit 643a606fa2742b94f6eca620119b7d2686ca9cd3)
---
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);
}