aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuyang Chung <wy-chung@outlook.com>2025-09-02 06:23:26 +0000
committerWarner Losh <imp@FreeBSD.org>2025-09-05 18:42:20 +0000
commita930cc8bad644039cfcfa5ff7c6fe3e8548aa9ae (patch)
treefadd3baab1049cbe160da14ceb78f17969d3c140
parent6714e127945c736857cd86aff41d9cbd29ce7f7c (diff)
GEOM_UNION: Should free sc in g_union_ctl_create when error happened.
Signed-off-by: Wuyang Chung <wy-chung@outlook.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1835
-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 9734fc1bcfe3..0701e76db671 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);
+ g_free(sc);
g_destroy_geom(gp);
}