vulkan: Fixed use-after-free bug.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 12 Jun 2019 15:37:07 -0400
changeset 12850f20a317cc8ad
parent 12849 5cd9ce1d28f2
child 12851 04505849b231
vulkan: Fixed use-after-free bug.
src/video/SDL_vulkan_utils.c
     1.1 --- a/src/video/SDL_vulkan_utils.c	Wed Jun 12 15:35:06 2019 -0400
     1.2 +++ b/src/video/SDL_vulkan_utils.c	Wed Jun 12 15:37:07 2019 -0400
     1.3 @@ -400,9 +400,7 @@
     1.4                  vkGetDisplayPlaneSupportedDisplaysKHR(physicalDevice, i, &planeSupportedDisplaysCount, NULL);
     1.5              if (result != VK_SUCCESS || planeSupportedDisplaysCount == 0)
     1.6              {
     1.7 -                /* No supported displays, on to next plane. */
     1.8 -                SDL_free(displayPlaneProperties);
     1.9 -                continue;
    1.10 +                continue;  /* No supported displays, on to next plane. */
    1.11              }
    1.12              SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Number of supported displays for plane %u: %u", i, planeSupportedDisplaysCount);
    1.13