projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c8e1e5
)
vk/device: Provide proper NULL handling in anv_device_free
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Wed, 15 Jul 2015 22:15:54 +0000
(15:15 -0700)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Wed, 15 Jul 2015 22:22:32 +0000
(15:22 -0700)
The Vulkan spec does not specify that the free function provided to
CreateInstance must handle NULL properly so we do it in the wrapper. If
this ever changes in the spec, we can delete the extra 2 lines.
src/vulkan/device.c
patch
|
blob
|
history
diff --git
a/src/vulkan/device.c
b/src/vulkan/device.c
index 2b8bcbe9e820c63f625f1e54a7e5f5b318c563ca..454e8f48f428a51ed8b73d44d51024668299382d 100644
(file)
--- a/
src/vulkan/device.c
+++ b/
src/vulkan/device.c
@@
-1057,6
+1057,9
@@
void
anv_device_free(struct anv_device * device,
void * mem)
{
+ if (mem == NULL)
+ return;
+
return device->instance->pfnFree(device->instance->pAllocUserData,
mem);
}