projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1826624
)
util/vk_alloc: Ensure NULL is handled correctly in vk_free
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Fri, 11 Nov 2016 05:12:16 +0000
(21:12 -0800)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Thu, 17 Nov 2016 04:07:23 +0000
(20:07 -0800)
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/util/vk_alloc.h
patch
|
blob
|
history
diff --git
a/src/util/vk_alloc.h
b/src/util/vk_alloc.h
index a8e21cade11751f2867b9671a3a662b44486b2f2..7ae5c9dfe40cacbc66f5ca4f9fa3097211dd5fbc 100644
(file)
--- a/
src/util/vk_alloc.h
+++ b/
src/util/vk_alloc.h
@@
-46,6
+46,9
@@
vk_realloc(const VkAllocationCallbacks *alloc,
static inline void
vk_free(const VkAllocationCallbacks *alloc, void *data)
{
+ if (data == NULL)
+ return;
+
alloc->pfnFree(alloc->pUserData, data);
}