vk/gem: Call VALGRIND_FREELIKE_BLOCK before unmapping
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 5 Jun 2015 23:41:49 +0000 (16:41 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 5 Jun 2015 23:41:49 +0000 (16:41 -0700)
src/vulkan/gem.c

index 8598deedc71f08ca705aa3285cf094509d5fdc84..ab6f5c4dfbd108b487b3bedc5f4a57ebca7837ee 100644 (file)
@@ -123,8 +123,8 @@ anv_gem_mmap(struct anv_device *device, uint32_t gem_handle,
 void
 anv_gem_munmap(void *p, uint64_t size)
 {
-   munmap(p, size);
    VG(VALGRIND_FREELIKE_BLOCK(p, 0));
+   munmap(p, size);
 }
 
 int