aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/geom_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/geom_dev.c')
-rw-r--r--sys/geom/geom_dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index 9b25871f2b5c..b090d753b56e 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -244,7 +244,6 @@ g_dev_close(dev_t dev, int flags, int fmt, struct thread *td)
return (error);
}
-MALLOC_DEFINE(M_GEOMGIO, "GEOMGIO", "Geom data structures");
/*
* XXX: Until we have unmessed the ioctl situation, there is a race against
* XXX: a concurrent orphanization. We cannot close it by holding topology
@@ -273,6 +272,7 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
("Consumer with zero access count in g_dev_ioctl"));
DROP_GIANT();
+ gio = NULL;
i = IOCPARM_LEN(cmd);
switch (cmd) {
case DIOCGSECTORSIZE:
@@ -314,7 +314,7 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
break;
default:
- gio = malloc(sizeof *gio, M_GEOMGIO, M_WAITOK | M_ZERO);
+ gio = g_malloc(sizeof *gio, M_WAITOK | M_ZERO);
gio->cmd = cmd;
gio->data = data;
gio->fflag = fflag;
@@ -354,7 +354,7 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
error = ENOTTY;
}
if (gio != NULL)
- free(gio, M_GEOMGIO);
+ g_free(gio);
return (error);
}