mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Do not check for NULL in vkd3d_shader_free_scan_descriptor_info().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9a0692978e
commit
6c10b52804
@ -884,6 +884,7 @@ int vkd3d_shader_scan(const struct vkd3d_shader_compile_info *compile_info, char
|
|||||||
if (instruction.handler_idx == VKD3DSIH_INVALID)
|
if (instruction.handler_idx == VKD3DSIH_INVALID)
|
||||||
{
|
{
|
||||||
WARN("Encountered unrecognized or invalid instruction.\n");
|
WARN("Encountered unrecognized or invalid instruction.\n");
|
||||||
|
if (scan_descriptor_info)
|
||||||
vkd3d_shader_free_scan_descriptor_info(scan_descriptor_info);
|
vkd3d_shader_free_scan_descriptor_info(scan_descriptor_info);
|
||||||
ret = VKD3D_ERROR_INVALID_SHADER;
|
ret = VKD3D_ERROR_INVALID_SHADER;
|
||||||
goto done;
|
goto done;
|
||||||
@ -891,6 +892,7 @@ int vkd3d_shader_scan(const struct vkd3d_shader_compile_info *compile_info, char
|
|||||||
|
|
||||||
if ((ret = vkd3d_shader_scan_instruction(&context, &instruction)) < 0)
|
if ((ret = vkd3d_shader_scan_instruction(&context, &instruction)) < 0)
|
||||||
{
|
{
|
||||||
|
if (scan_descriptor_info)
|
||||||
vkd3d_shader_free_scan_descriptor_info(scan_descriptor_info);
|
vkd3d_shader_free_scan_descriptor_info(scan_descriptor_info);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -910,9 +912,6 @@ done:
|
|||||||
|
|
||||||
void vkd3d_shader_free_scan_descriptor_info(struct vkd3d_shader_scan_descriptor_info *scan_descriptor_info)
|
void vkd3d_shader_free_scan_descriptor_info(struct vkd3d_shader_scan_descriptor_info *scan_descriptor_info)
|
||||||
{
|
{
|
||||||
if (!scan_descriptor_info)
|
|
||||||
return;
|
|
||||||
|
|
||||||
vkd3d_free(scan_descriptor_info->descriptors);
|
vkd3d_free(scan_descriptor_info->descriptors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user