summaryrefslogtreecommitdiffstats
path: root/sys/geom/vinum/geom_vinum_volume.c
diff options
context:
space:
mode:
authorle <le@FreeBSD.org>2004-06-18 19:53:33 +0000
committerle <le@FreeBSD.org>2004-06-18 19:53:33 +0000
commitb7f1bee2cf9b05ab722e1afbc5292becbd9075f8 (patch)
treec2b00455cfce196919f914d1a51ff3ed4f7d26c3 /sys/geom/vinum/geom_vinum_volume.c
parent3a20dac2f54d6a7e89c05998cfa171b1809a111d (diff)
downloadFreeBSD-src-b7f1bee2cf9b05ab722e1afbc5292becbd9075f8.zip
FreeBSD-src-b7f1bee2cf9b05ab722e1afbc5292becbd9075f8.tar.gz
Clean up allocated ressources when destroying the main vinum geom.
Diffstat (limited to 'sys/geom/vinum/geom_vinum_volume.c')
-rw-r--r--sys/geom/vinum/geom_vinum_volume.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/geom/vinum/geom_vinum_volume.c b/sys/geom/vinum/geom_vinum_volume.c
index c39d1e4..7f4216a 100644
--- a/sys/geom/vinum/geom_vinum_volume.c
+++ b/sys/geom/vinum/geom_vinum_volume.c
@@ -62,7 +62,8 @@ gv_volume_orphan(struct g_consumer *cp)
if (!LIST_EMPTY(&gp->consumer))
return;
v = gp->softc;
- v->geom = NULL;
+ if (v != NULL)
+ v->geom = NULL;
gp->softc = NULL;
g_wither_geom(gp, error);
}
@@ -243,11 +244,7 @@ gv_volume_destroy_geom(struct gctl_req *req, struct g_class *mp,
{
g_trace(G_T_TOPOLOGY, "gv_volume_destroy_geom: %s", gp->name);
g_topology_assert();
-/*
- if (gp->softc != NULL)
- g_free(gp->softc);
- gp->softc = NULL;
-*/
+
g_wither_geom(gp, ENXIO);
return (0);
}
OpenPOWER on IntegriCloud