diff options
| author | Dave Airlie <airlied@redhat.com> | 2019-04-12 16:58:03 +1000 |
|---|---|---|
| committer | jeremyk-lunarg <jeremyk@lunarg.com> | 2019-04-23 13:19:30 -0600 |
| commit | bd66faa0a5694375f8afb5d2fd1e3f5e5bd6d097 (patch) | |
| tree | 7ee1d615186f2c9acc1305a2e9a5c6287f172bec | |
| parent | 637506cd6d806c9c8f971a814731e00c3e31b739 (diff) | |
| download | usermoji-bd66faa0a5694375f8afb5d2fd1e3f5e5bd6d097.tar.xz | |
vulkaninfo: use correct type in malloc sizing.
warning: Result of 'malloc' is converted to a pointer of type 'VkPresentModeKHR', which is incompatible with sizeof operand type 'VkPresentInfoKHR'
Pointed out by coverity.
| -rw-r--r-- | vulkaninfo/vulkaninfo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vulkaninfo/vulkaninfo.c b/vulkaninfo/vulkaninfo.c index 8dfa33b2..aba59830 100644 --- a/vulkaninfo/vulkaninfo.c +++ b/vulkaninfo/vulkaninfo.c @@ -1585,7 +1585,7 @@ static int AppDumpSurfacePresentModes(struct AppInstance *inst, struct AppGpu *g err = inst->vkGetPhysicalDeviceSurfacePresentModesKHR(gpu->obj, surface, &present_mode_count, NULL); if (err) ERR_EXIT(err); - VkPresentModeKHR *surf_present_modes = (VkPresentModeKHR *)malloc(present_mode_count * sizeof(VkPresentInfoKHR)); + VkPresentModeKHR *surf_present_modes = (VkPresentModeKHR *)malloc(present_mode_count * sizeof(VkPresentModeKHR)); if (!surf_present_modes) ERR_EXIT(VK_ERROR_OUT_OF_HOST_MEMORY); err = inst->vkGetPhysicalDeviceSurfacePresentModesKHR(gpu->obj, surface, &present_mode_count, surf_present_modes); if (err) ERR_EXIT(err); |
