aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/union/g_union.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/union/g_union.c')
-rw-r--r--sys/geom/union/g_union.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/geom/union/g_union.c b/sys/geom/union/g_union.c
index 9734fc1bcfe3..43c16c86e5a8 100644
--- a/sys/geom/union/g_union.c
+++ b/sys/geom/union/g_union.c
@@ -246,7 +246,7 @@ g_union_ctl_create(struct gctl_req *req, struct g_class *mp, bool verbose)
return;
}
}
- gp = g_new_geomf(mp, "%s", name);
+ gp = g_new_geom(mp, name);
sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO);
rw_init(&sc->sc_rwlock, "gunion");
TAILQ_INIT(&sc->sc_wiplist);
@@ -358,6 +358,8 @@ fail2:
fail1:
g_destroy_consumer(lowercp);
g_destroy_provider(newpp);
+ rw_destroy(&sc->sc_rwlock);
+ g_free(sc);
g_destroy_geom(gp);
}