diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2014-04-06 02:20:42 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2014-04-06 02:20:42 +0000 |
commit | 12b2d77da9138382650bbec24545cef377b1b860 (patch) | |
tree | eed4913dfac1be88aedc4e73296e1b6442fac4a4 /sys/geom/geom_slice.c | |
parent | 2d1e88da97f1ec753fe4b38fd2a0c0b1802b44d4 (diff) | |
download | src-12b2d77da9138382650bbec24545cef377b1b860.tar.gz src-12b2d77da9138382650bbec24545cef377b1b860.zip |
Notes
Diffstat (limited to 'sys/geom/geom_slice.c')
-rw-r--r-- | sys/geom/geom_slice.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index f40a4de129e3..2102ae9c0809 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -534,11 +534,14 @@ g_slice_new(struct g_class *mp, u_int slices, struct g_provider *pp, struct g_co void g_slice_orphan(struct g_consumer *cp) { + struct g_slicer *gsp; g_trace(G_T_TOPOLOGY, "g_slice_orphan(%p/%s)", cp, cp->provider->name); g_topology_assert(); /* XXX: Not good enough we leak the softc and its suballocations */ - g_slice_free(cp->geom->softc); + gsp = cp->geom->softc; + cp->geom->softc = NULL; + g_slice_free(gsp); g_wither_geom(cp->geom, ENXIO); } |