aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/geom_vol_ffs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/geom_vol_ffs.c')
-rw-r--r--sys/geom/geom_vol_ffs.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/geom/geom_vol_ffs.c b/sys/geom/geom_vol_ffs.c
index 7fedfc195c88..a01af4dc7af5 100644
--- a/sys/geom/geom_vol_ffs.c
+++ b/sys/geom/geom_vol_ffs.c
@@ -89,12 +89,8 @@ g_vol_ffs_taste(struct g_class *mp, struct g_provider *pp, int flags)
for (sb=0; (superblock = superblocks[sb]) != -1; sb++) {
fs = (struct fs *) g_read_data(cp, superblock,
SBLOCKSIZE, &error);
- if (fs == NULL)
+ if (fs == NULL || error != 0)
continue;
- if (error != 0) {
- g_free(fs);
- continue;
- }
/* Check for magic and make sure things are the right size */
if (fs->fs_magic == FS_UFS1_MAGIC) {
if (fs->fs_old_size * fs->fs_fsize !=
@@ -132,7 +128,7 @@ g_vol_ffs_taste(struct g_class *mp, struct g_provider *pp, int flags)
g_topology_lock();
g_access_rel(cp, -1, 0, 0);
if (LIST_EMPTY(&gp->provider)) {
- g_slice_spoiled(cp);
+ g_std_spoiled(cp);
return (NULL);
}
return (gp);