diff options
author | pjd <pjd@FreeBSD.org> | 2007-04-29 00:41:29 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-04-29 00:41:29 +0000 |
commit | a50bed807022af485b0d1a256e203bb4b543d05a (patch) | |
tree | 5dc92163128989c6b9ececfa01fdd9358da43980 /sys/cddl | |
parent | ea35d42ca748e98e41f8950e7c9c7bc4af1f62ea (diff) | |
download | FreeBSD-src-a50bed807022af485b0d1a256e203bb4b543d05a.zip FreeBSD-src-a50bed807022af485b0d1a256e203bb4b543d05a.tar.gz |
Fix two use-after-free cases.
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c index 9699171..39358e9 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c @@ -84,13 +84,13 @@ vdev_geom_orphan(struct g_consumer *cp) ZFS_LOG(1, "Closing access to %s.", cp->provider->name); g_access(cp, -cp->acr, -cp->acw, -cp->ace); - g_detach(cp); ZFS_LOG(1, "Destroyed consumer to %s.", cp->provider->name); + g_detach(cp); g_destroy_consumer(cp); /* Destroy geom if there are no consumers left. */ if (LIST_EMPTY(&gp->consumer)) { ZFS_LOG(1, "Destroyed geom %s.", gp->name); - g_wither_geom(cp->geom, error); + g_wither_geom(gp, error); } vdev_geom_release(vd); /* Both methods below work, but in a bit different way. */ |