Fix freeing of vulkan feature structs is test context.
If the CreateVkBackendContext fails, we need to make the VkphysicalDeviceFeatures2 struct at least has null filled into its pNext so the FreeVulkanFeaturesStructs calls doesn't try to free random memory. Bug: skia: Change-Id: I171d125ccba087cdd39595aca815d95463115b19 Reviewed-on: https://skia-review.googlesource.com/150139 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
d0f0cb8ffc
commit
74b1c01cdd
@ -177,6 +177,7 @@ public:
|
||||
};
|
||||
extensions = new GrVkExtensions();
|
||||
features = new VkPhysicalDeviceFeatures2;
|
||||
memset(features, 0, sizeof(VkPhysicalDeviceFeatures2));
|
||||
if (!sk_gpu_test::CreateVkBackendContext(getProc, &backendContext, extensions,
|
||||
features, &debugCallback)) {
|
||||
sk_gpu_test::FreeVulkanFeaturesStructs(features);
|
||||
|
Loading…
Reference in New Issue
Block a user