Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2025 15:48:41 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ecca34fa9695 - main - gunion: Also destroy the rw_lock
Message-ID:  <202509121548.58CFmfHP043926@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=ecca34fa969579e53e4940ef9d7a7e170e872e77

commit ecca34fa969579e53e4940ef9d7a7e170e872e77
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-09-09 23:42:50 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-09-12 15:48:24 +0000

    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
---
 sys/geom/union/g_union.c | 1 +
 1 file changed, 1 insertion(+)

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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509121548.58CFmfHP043926>