wineopenxr: Don't leak our_images on error in wine_xrEnumerateSwapchainImages().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
This commit is contained in:
parent
5cec20f700
commit
53f2b7aea2
1 changed files with 2 additions and 3 deletions
|
@ -1550,7 +1550,7 @@ XrResult WINAPI wine_xrEnumerateSwapchainImages(XrSwapchain swapchain, uint32_t
|
||||||
wine_XrSwapchain *wine_swapchain = (wine_XrSwapchain *)swapchain;
|
wine_XrSwapchain *wine_swapchain = (wine_XrSwapchain *)swapchain;
|
||||||
wine_XrInstance *wine_instance = wine_swapchain->wine_session->wine_instance;
|
wine_XrInstance *wine_instance = wine_swapchain->wine_session->wine_instance;
|
||||||
XrResult res;
|
XrResult res;
|
||||||
XrSwapchainImageVulkanKHR *our_images;
|
XrSwapchainImageVulkanKHR *our_images = NULL;
|
||||||
XrSwapchainImageBaseHeader *their_images = images;
|
XrSwapchainImageBaseHeader *their_images = images;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
uint32_t i;
|
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);
|
WINE_TRACE("Successfully allocated texture %p\n", their_d3d11[i].texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
heap_free(our_images);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
heap_free(our_images);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue