util/vk_alloc: Ensure NULL is handled correctly in vk_free
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
18266247a0
commit
d0646c8015
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue