diff options
author | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-06-06 17:46:17 +0000 |
---|---|---|
committer | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-06-06 17:46:17 +0000 |
commit | 1a9e5bae109b476f9ee34975242c8938aaac4146 (patch) | |
tree | 91d96707a6c6bd4584fb2f196721479688d0df0c /linux-core/drm_fops.c | |
parent | 6bacb180cef00573fc41a1e79bdd5b89d6f1c1f5 (diff) |
Fix drm_remove_magic potential memory leak / corruption. Move drm
authentication token hashing to new generic hash table implementation.
Diffstat (limited to 'linux-core/drm_fops.c')
-rw-r--r-- | linux-core/drm_fops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c index a1962135..632108db 100644 --- a/linux-core/drm_fops.c +++ b/linux-core/drm_fops.c @@ -72,10 +72,8 @@ static int drm_setup(drm_device_t * dev) for (i = 0; i < DRM_ARRAY_SIZE(dev->counts); i++) atomic_set(&dev->counts[i], 0); - for (i = 0; i < DRM_HASH_SIZE; i++) { - dev->magiclist[i].head = NULL; - dev->magiclist[i].tail = NULL; - } + drm_ht_create(&dev->magiclist, DRM_MAGIC_HASH_ORDER); + INIT_LIST_HEAD(&dev->magicfree); dev->ctxlist = drm_alloc(sizeof(*dev->ctxlist), DRM_MEM_CTXLIST); if (dev->ctxlist == NULL) |