Fix memory leak.

PR:            kern/58634
Submitted by:  le
Approved by:   phk
This commit is contained in:
Lukas Ertl 2004-02-06 22:51:04 +00:00
parent a4a62f5d1f
commit 5b2f81ec4b

View File

@ -452,9 +452,9 @@ g_fox_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp)
g_topology_assert();
sc = gp->softc;
gp->softc = NULL;
mtx_destroy(&sc->lock);
g_free(gp->softc);
gp->softc = NULL;
g_wither_geom(gp, ENXIO);
return (0);
}