forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpu: vulkan: Fix double free of debug report callback after failed init
If VulkanInstance fails to initialize, Destroy() will be called twice, once in VulkanImplementation::InitializeVulkanInstance() and once in the destructor. The VkInstanceKHR is not double freed because there is a null check. Add a null check for the debug report callback, and also remove the explicit Destroy() calls since there isn't a care where we'll retry a failed vulkan initialization with the same object. Bug: 921276 Test: Run on fuchsia with partial vulkan layer/ext naming transition Change-Id: I02b3b7dfba5bcebdc2d4010bcb2f2690f125e78e Reviewed-on: https://chromium-review.googlesource.com/c/1407254 Commit-Queue: Michael Spang <[email protected]> Reviewed-by: Antoine Labour <[email protected]> Reviewed-by: Sergey Ulanov <[email protected]> Cr-Commit-Position: refs/heads/master@{#622613}
- Loading branch information
Showing
7 changed files
with
18 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters