summaryrefslogtreecommitdiff
path: root/libkms/intel.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-01-15 20:13:20 +0000
committerJakob Bornecrantz <jakob@vmware.com>2010-01-15 20:13:20 +0000
commit2959266188dd564975503d74e24b55013f58f861 (patch)
tree62589f2cf5d276b994910944dfa81de93a127081 /libkms/intel.c
parent320811b282d7f57b364f8414e2e7b714f89b0503 (diff)
downloadlibdrm-2959266188dd564975503d74e24b55013f58f861.tar.gz
libdrm-2959266188dd564975503d74e24b55013f58f861.tar.bz2
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)
struct drm_gem_close arg;
int ret;
- if (bo->base.ptr)
+ if (bo->base.ptr) {
+ /* XXX Sanity check map_count */
munmap(bo->base.ptr, bo->base.size);
+ bo->base.ptr = NULL;
+ }
memset(&arg, 0, sizeof(arg));
arg.handle = bo->base.handle;