mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Avoid leaking "messages" when "error_blob" is NULL in vkd3d_serialize_versioned_root_signature(). (Valgrind).
This commit is contained in:
parent
8a7cb0295a
commit
c7fc60a237
Notes:
Alexandre Julliard
2024-04-17 23:30:14 +02:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/798
@ -493,11 +493,10 @@ HRESULT vkd3d_serialize_versioned_root_signature(const D3D12_VERSIONED_ROOT_SIGN
|
||||
if ((ret = vkd3d_shader_serialize_root_signature(vkd3d_desc, &dxbc, &messages)) < 0)
|
||||
{
|
||||
WARN("Failed to serialize root signature, vkd3d result %d.\n", ret);
|
||||
if (error_blob && messages)
|
||||
{
|
||||
if (FAILED(hr = vkd3d_blob_create(messages, strlen(messages), error_blob)))
|
||||
ERR("Failed to create error blob, hr %s.\n", debugstr_hresult(hr));
|
||||
}
|
||||
if (!error_blob)
|
||||
vkd3d_shader_free_messages(messages);
|
||||
else if (messages && FAILED(hr = vkd3d_blob_create(messages, strlen(messages), error_blob)))
|
||||
ERR("Failed to create error blob, hr %s.\n", debugstr_hresult(hr));
|
||||
return hresult_from_vkd3d_result(ret);
|
||||
}
|
||||
vkd3d_shader_free_messages(messages);
|
||||
|
Loading…
Reference in New Issue
Block a user