diff options
author | Dave Airlie <airlied@panoply-rh.(none)> | 2008-03-17 16:34:15 +1000 |
---|---|---|
committer | Dave Airlie <airlied@panoply-rh.(none)> | 2008-03-17 16:38:18 +1000 |
commit | 2d0411cb7544ea45b5879d4f454cb9ee3c9ff5fb (patch) | |
tree | 44946e7f42c6f957c8a7f29fd64ba59689f1842a | |
parent | e6be93b2a6f508b2284a6d352f5f0640ef1a542a (diff) |
i915: safety check the sarea map still exists
-rw-r--r-- | shared-core/i915_init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c index fa2fc3da..a76acb4e 100644 --- a/shared-core/i915_init.c +++ b/shared-core/i915_init.c @@ -383,7 +383,9 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) if (!master_priv) return; - drm_rmmap(dev, master_priv->sarea); + if (master_priv->sarea) + drm_rmmap(dev, master_priv->sarea); + drm_free(master_priv, sizeof(*master_priv), DRM_MEM_DRIVER); master->driver_priv = NULL; |