summaryrefslogtreecommitdiff
path: root/bsd-core/drm_auth.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-11-07 00:25:49 +0000
committerEric Anholt <anholt@freebsd.org>2004-11-07 00:25:49 +0000
commitfa3fdbd99c6b6e5cec59f1044ce6ce1105b5e8dd (patch)
tree933ce98d92e14b9b801f4a9e4988314be685836a /bsd-core/drm_auth.c
parentd37457b5996c09d1965f8906501cd1fde6aa9499 (diff)
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.
Diffstat (limited to 'bsd-core/drm_auth.c')
-rw-r--r--bsd-core/drm_auth.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bsd-core/drm_auth.c b/bsd-core/drm_auth.c
index c04c6546..fb556f33 100644
--- a/bsd-core/drm_auth.c
+++ b/bsd-core/drm_auth.c
@@ -63,10 +63,9 @@ static int drm_add_magic(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic)
DRM_DEBUG("%d\n", magic);
- hash = drm_hash_magic(magic);
- entry = (drm_magic_entry_t*) drm_alloc(sizeof(*entry), DRM_MEM_MAGIC);
+ hash = drm_hash_magic(magic);
+ entry = malloc(sizeof(*entry), M_DRM, M_ZERO | M_NOWAIT);
if (!entry) return DRM_ERR(ENOMEM);
- memset(entry, 0, sizeof(*entry));
entry->magic = magic;
entry->priv = priv;
entry->next = NULL;
@@ -111,7 +110,7 @@ static int drm_remove_magic(drm_device_t *dev, drm_magic_t magic)
}
DRM_UNLOCK();
- drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC);
+ free(pt, M_DRM);
return DRM_ERR(EINVAL);
}