On Wed Jan 10 22:00:17 2024 +0000, Henri Verbeet wrote:
+ /* Unlike other effect profiles fx_4_x is using DXBC
container. */
if (!strcmp(profile, "fx_4_0") || !strcmp(profile, "fx_4_1"))
{
struct vkd3d_shader_dxbc_section_desc section = { .tag =
TAG_FX10, .data = byte_code };
struct vkd3d_shader_code dxbc;
if ((ret = vkd3d_shader_serialize_dxbc(1, §ion,
&dxbc, NULL)))
{
vkd3d_shader_free_shader_code(&byte_code);
return hresult_from_vkd3d_result(ret);
}
byte_code = dxbc;
}
I think that leaks the original "byte_code". I.e., we should call vkd3d_shader_free_shader_code() on "byte_code" on success as well, right?
Yes, that looks like a mistake. Fixed now.