freedreno: fix device close issues
Move closing the fd to after subclass ->destroy() (since it might want to delete gem bo's, etc), and actually free() the fd_device object. Signed-off-by: Rob Clark <robclark@freedesktop.org>main
parent
d0dae26ca4
commit
a07ae97c75
|
@ -115,9 +115,10 @@ static void fd_device_del_impl(struct fd_device *dev)
|
|||
fd_bo_cache_cleanup(&dev->bo_cache, 0);
|
||||
drmHashDestroy(dev->handle_table);
|
||||
drmHashDestroy(dev->name_table);
|
||||
dev->funcs->destroy(dev);
|
||||
if (dev->closefd)
|
||||
close(dev->fd);
|
||||
dev->funcs->destroy(dev);
|
||||
free(dev);
|
||||
}
|
||||
|
||||
drm_private void fd_device_del_locked(struct fd_device *dev)
|
||||
|
|
Loading…
Reference in New Issue