aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/geom_mbr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/geom_mbr.c')
-rw-r--r--sys/geom/geom_mbr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c
index c0232a7ebb50..362e54089c8f 100644
--- a/sys/geom/geom_mbr.c
+++ b/sys/geom/geom_mbr.c
@@ -300,7 +300,7 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist)
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);
@@ -398,10 +398,8 @@ g_mbrext_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
buf = g_read_data(cp, off, sectorsize, &error);
if (buf == NULL || error != 0)
break;
- if (buf[0x1fe] != 0x55 && buf[0x1ff] != 0xaa) {
- g_free(buf);
+ if (buf[0x1fe] != 0x55 && buf[0x1ff] != 0xaa)
break;
- }
for (i = 0; i < NDOSPART; i++)
dos_partition_dec(
buf + DOSPARTOFF +
@@ -442,7 +440,7 @@ g_mbrext_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
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);