aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Bornecrantz2010-01-15 14:13:20 -0600
committerJakob Bornecrantz2010-01-15 14:13:20 -0600
commit2959266188dd564975503d74e24b55013f58f861 (patch)
tree62589f2cf5d276b994910944dfa81de93a127081 /libkms/intel.c
parent320811b282d7f57b364f8414e2e7b714f89b0503 (diff)
downloadexternal-libdrm-2959266188dd564975503d74e24b55013f58f861.tar.gz
external-libdrm-2959266188dd564975503d74e24b55013f58f861.tar.xz
external-libdrm-2959266188dd564975503d74e24b55013f58f861.zip
libkms: Fix multiple map unmap in vmwgfx and add comment in intel
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;