aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'libkms/intel.c')
-rw-r--r--libkms/intel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libkms/intel.c b/libkms/intel.c
index 784ee7b6..670494e7 100644
--- a/libkms/intel.c
+++ b/libkms/intel.c
@@ -220,8 +220,11 @@ intel_bo_destroy(struct kms_bo *_bo)
220 struct drm_gem_close arg; 220 struct drm_gem_close arg;
221 int ret; 221 int ret;
222 222
223 if (bo->base.ptr) 223 if (bo->base.ptr) {
224 /* XXX Sanity check map_count */
224 munmap(bo->base.ptr, bo->base.size); 225 munmap(bo->base.ptr, bo->base.size);
226 bo->base.ptr = NULL;
227 }
225 228
226 memset(&arg, 0, sizeof(arg)); 229 memset(&arg, 0, sizeof(arg));
227 arg.handle = bo->base.handle; 230 arg.handle = bo->base.handle;