mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-08 23:18:05 +02:00
Respect refcount when freeing dev_priv.
This commit is contained in:
parent
f7c3041156
commit
5cfe58b33e
2 changed files with 2 additions and 2 deletions
|
|
@ -962,11 +962,11 @@ int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
|
|||
priv->refs--;
|
||||
if (!priv->refs) {
|
||||
TAILQ_REMOVE(&dev->files, priv, link);
|
||||
DRM(free)( priv, sizeof(*priv), DRM_MEM_FILES );
|
||||
}
|
||||
}
|
||||
DRM_UNLOCK;
|
||||
|
||||
DRM(free)( priv, sizeof(*priv), DRM_MEM_FILES );
|
||||
|
||||
/* ========================================================
|
||||
* End inline drm_release
|
||||
|
|
|
|||
|
|
@ -962,11 +962,11 @@ int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
|
|||
priv->refs--;
|
||||
if (!priv->refs) {
|
||||
TAILQ_REMOVE(&dev->files, priv, link);
|
||||
DRM(free)( priv, sizeof(*priv), DRM_MEM_FILES );
|
||||
}
|
||||
}
|
||||
DRM_UNLOCK;
|
||||
|
||||
DRM(free)( priv, sizeof(*priv), DRM_MEM_FILES );
|
||||
|
||||
/* ========================================================
|
||||
* End inline drm_release
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue