diff options
author | Jason Ekstrand <[email protected]> | 2016-11-10 21:12:16 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-11-16 20:07:23 -0800 |
commit | d0646c8015015b90bcc933e23bdd927cc0c81bb7 (patch) | |
tree | 6ae54e6f356c4a2dea6701c9428a356ad773d8c0 /src/util/vk_alloc.h | |
parent | 18266247a0750f2e63dc8ba1bb790177098a0354 (diff) |
util/vk_alloc: Ensure NULL is handled correctly in vk_free
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/util/vk_alloc.h')
-rw-r--r-- | src/util/vk_alloc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/vk_alloc.h b/src/util/vk_alloc.h index a8e21cade11..7ae5c9dfe40 100644 --- 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); } |