wineopenxr: Don't leak our_images on error in wine_xrEnumerateSwapchainImages().

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
This commit is contained in:
Paul Gofman 2021-03-04 19:33:47 +03:00 committed by Andrew Eikum
parent 5cec20f700
commit 53f2b7aea2

View file

@ -1550,7 +1550,7 @@ XrResult WINAPI wine_xrEnumerateSwapchainImages(XrSwapchain swapchain, uint32_t
wine_XrSwapchain *wine_swapchain = (wine_XrSwapchain *)swapchain;
wine_XrInstance *wine_instance = wine_swapchain->wine_session->wine_instance;
XrResult res;
XrSwapchainImageVulkanKHR *our_images;
XrSwapchainImageVulkanKHR *our_images = NULL;
XrSwapchainImageBaseHeader *their_images = images;
HRESULT hr;
uint32_t i;
@ -1598,10 +1598,9 @@ XrResult WINAPI wine_xrEnumerateSwapchainImages(XrSwapchain swapchain, uint32_t
}
WINE_TRACE("Successfully allocated texture %p\n", their_d3d11[i].texture);
}
heap_free(our_images);
}
}
heap_free(our_images);
return res;
}