From fa3fdbd99c6b6e5cec59f1044ce6ce1105b5e8dd Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 7 Nov 2004 00:25:49 +0000 Subject: Now that the memory debug code is gone, and all 3 BSDs have M_ZERO, stop using drm_alloc/drm_free in the core and instead use plain malloc/free. --- bsd-core/drm_fops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bsd-core/drm_fops.c') diff --git a/bsd-core/drm_fops.c b/bsd-core/drm_fops.c index 072a6e22..eeb4847a 100644 --- a/bsd-core/drm_fops.c +++ b/bsd-core/drm_fops.c @@ -70,12 +70,11 @@ int drm_open_helper(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p, if (priv) { priv->refs++; } else { - priv = (drm_file_t *)drm_alloc(sizeof(*priv), DRM_MEM_FILES); + priv = malloc(sizeof(*priv), M_DRM, M_NOWAIT | M_ZERO); if (priv == NULL) { DRM_UNLOCK(); return DRM_ERR(ENOMEM); } - bzero(priv, sizeof(*priv)); #if __FreeBSD_version >= 500000 priv->uid = p->td_ucred->cr_svuid; priv->pid = p->td_proc->p_pid; -- cgit v1.2.3