From e2ba08d28335b43515ccbefcc21052ed0d5a7e47 Mon Sep 17 00:00:00 2001 From: Jon Smirl Date: Thu, 30 Jun 2005 16:00:35 +0000 Subject: release can happen before dev->ctxlist is allocated --- linux-core/drm_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-core/drm_fops.c') diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c index fd1704b8..74c7e93c 100644 --- a/linux-core/drm_fops.c +++ b/linux-core/drm_fops.c @@ -401,7 +401,7 @@ int drm_release(struct inode *inode, struct file *filp) drm_fasync(-1, filp, 0); down(&dev->ctxlist_sem); - if (!list_empty(&dev->ctxlist->head)) { + if (dev->ctxlist && (!list_empty(&dev->ctxlist->head))) { drm_ctx_list_t *pos, *n; list_for_each_entry_safe(pos, n, &dev->ctxlist->head, head) { -- cgit v1.2.3