Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfb2b9bd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "vulkan: Correct access after free issue"

parents ace30d2b 1531bf11
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1049,7 +1049,8 @@ VkBool32 LayerChain::DebugReportCallback(VkDebugReportFlagsEXT flags,
VkResult LayerChain::CreateInstance(const VkInstanceCreateInfo* create_info,
                                    const VkAllocationCallbacks* allocator,
                                    VkInstance* instance_out) {
    LayerChain chain(true, driver::DebugReportLogger(*create_info),
    const driver::DebugReportLogger logger(*create_info);
    LayerChain chain(true, logger,
                     (allocator) ? *allocator : driver::GetDefaultAllocator());

    VkResult result = chain.ActivateLayers(create_info->ppEnabledLayerNames,
@@ -1074,8 +1075,9 @@ VkResult LayerChain::CreateDevice(VkPhysicalDevice physical_dev,
                                  const VkDeviceCreateInfo* create_info,
                                  const VkAllocationCallbacks* allocator,
                                  VkDevice* dev_out) {
    const driver::DebugReportLogger logger = driver::Logger(physical_dev);
    LayerChain chain(
        false, driver::Logger(physical_dev),
        false, logger,
        (allocator) ? *allocator : driver::GetData(physical_dev).allocator);

    VkResult result = chain.ActivateLayers(