aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2025-09-09 23:42:50 +0000
committerWarner Losh <imp@FreeBSD.org>2025-09-12 15:48:24 +0000
commitecca34fa969579e53e4940ef9d7a7e170e872e77 (patch)
tree0f80ea2ed251615e35efab854567be826ea9f0ee
parent4c6cf6107b824f7ba4a3fe66db8e0a36c8dd8b04 (diff)
gunion: Also destroy the rw_lock
We also need to destroy the rw_lock when we free the softc. Noticed by: markj Fixes: 656f7f43f204 Sponsored by: Netflix
-rw-r--r--sys/geom/union/g_union.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/geom/union/g_union.c b/sys/geom/union/g_union.c
index 302761597f6f..43c16c86e5a8 100644
--- a/sys/geom/union/g_union.c
+++ b/sys/geom/union/g_union.c
@@ -358,6 +358,7 @@ fail2:
fail1:
g_destroy_consumer(lowercp);
g_destroy_provider(newpp);
+ rw_destroy(&sc->sc_rwlock);
g_free(sc);
g_destroy_geom(gp);
}