Skip to content
Snippets Groups Projects
Commit e9fd9a79 authored by Elizabeth Figura's avatar Elizabeth Figura Committed by Alexandre Julliard
Browse files

vkd3d-utils: Avoid leaking "messages" when vkd3d_blob_create() fails.

parent d1d9e713
No related branches found
No related tags found
No related merge requests found
......@@ -269,6 +269,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
{
if (FAILED(hr = vkd3d_blob_create(messages, strlen(messages), messages_blob)))
{
vkd3d_shader_free_messages(messages);
vkd3d_shader_free_shader_code(&byte_code);
return hr;
}
......@@ -356,6 +357,7 @@ HRESULT WINAPI D3DPreprocess(const void *data, SIZE_T size, const char *filename
{
if (FAILED(hr = vkd3d_blob_create(messages, strlen(messages), messages_blob)))
{
vkd3d_shader_free_messages(messages);
vkd3d_shader_free_shader_code(&preprocessed_code);
return hr;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment