aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2025-12-06 14:28:08 +0000
committerChristos Margiolis <christos@FreeBSD.org>2025-12-06 14:28:08 +0000
commit643a606fa2742b94f6eca620119b7d2686ca9cd3 (patch)
tree0030aef1413b8a6e868cba804a48c7a942c95bd6
parentd20da5c9736c3d93fc96e5e1c4dc40bed47bc419 (diff)
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
-rw-r--r--usr.sbin/sndctl/sndctl.c9
1 files changed, 1 insertions, 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);
}