mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-25 17:40:11 +01:00
Avoid kernel oops in some error paths calling drm_lastclose().
This commit is contained in:
parent
0d60cd0036
commit
4daa024918
1 changed files with 7 additions and 5 deletions
|
|
@ -163,11 +163,13 @@ int drm_lastclose(drm_device_t * dev)
|
|||
dev->unique_len = 0;
|
||||
}
|
||||
|
||||
list_for_each_entry_safe(pt, next, &dev->magicfree, head) {
|
||||
list_del(&pt->head);
|
||||
drm_ht_remove_item(&dev->magiclist, &pt->hash_item);
|
||||
drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC);
|
||||
}
|
||||
if (dev->magicfree.next) {
|
||||
list_for_each_entry_safe(pt, next, &dev->magicfree, head) {
|
||||
list_del(&pt->head);
|
||||
drm_ht_remove_item(&dev->magiclist, &pt->hash_item);
|
||||
drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Clear AGP information */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue